From 88153286ea2f11fea24b950e7dbb0075ceb49a54 Mon Sep 17 00:00:00 2001 From: Tobias Markmann Date: Thu, 15 Aug 2013 14:45:13 +0200 Subject: Getting rid of "-Wobjc-interface-ivars" warnings from clang. Move instance variables to implementation because they are deprecated to have in the interface. Requires 'Modern' obj-c runtime. Change-Id: I60d693b7966e08ccc003818ab51ea3633c90ae17 License: This patch is BSD-licensed, see Documentation/Licenses/BSD-simplified.txt for details. diff --git a/Slimber/Cocoa/CocoaController.h b/Slimber/Cocoa/CocoaController.h index 24070c6..c8287b7 100644 --- a/Slimber/Cocoa/CocoaController.h +++ b/Slimber/Cocoa/CocoaController.h @@ -11,9 +11,6 @@ class MainController; class CocoaMenulet; -@interface CocoaController : NSObject { - CocoaMenulet* menulet; - MainController* main; -} +@interface CocoaController : NSObject @end diff --git a/Slimber/Cocoa/CocoaController.mm b/Slimber/Cocoa/CocoaController.mm index a0c4ef4..2ee350d 100644 --- a/Slimber/Cocoa/CocoaController.mm +++ b/Slimber/Cocoa/CocoaController.mm @@ -4,7 +4,10 @@ #include "Slimber/Cocoa/CocoaMenulet.h" #include "Slimber/Cocoa/main.h" -@implementation CocoaController +@implementation CocoaController { + CocoaMenulet* menulet; + MainController* main; +} - (void) dealloc { delete main; diff --git a/SwifTools/Cocoa/CocoaAction.h b/SwifTools/Cocoa/CocoaAction.h index a46ef7c..0ef993e 100644 --- a/SwifTools/Cocoa/CocoaAction.h +++ b/SwifTools/Cocoa/CocoaAction.h @@ -9,9 +9,7 @@ #include #include -@interface CocoaAction : NSObject { - boost::function* function; -} +@interface CocoaAction : NSObject /** * Acquires ownership of 'f'. diff --git a/SwifTools/Cocoa/CocoaAction.mm b/SwifTools/Cocoa/CocoaAction.mm index d315caf..7162cd2 100644 --- a/SwifTools/Cocoa/CocoaAction.mm +++ b/SwifTools/Cocoa/CocoaAction.mm @@ -6,13 +6,15 @@ #include -@implementation CocoaAction +@implementation CocoaAction { + boost::function* function; +} - (id) initWithFunction: (boost::function*) f { - if ((self = [super init])) { - function = f; - } - return self; + if ((self = [super init])) { + function = f; + } + return self; } - (void) dealloc { diff --git a/SwifTools/URIHandler/MacOSXURIHandler.mm b/SwifTools/URIHandler/MacOSXURIHandler.mm index d386c86..cdfba33 100644 --- a/SwifTools/URIHandler/MacOSXURIHandler.mm +++ b/SwifTools/URIHandler/MacOSXURIHandler.mm @@ -12,13 +12,18 @@ using namespace Swift; @interface MacOSXURIEventHandler : NSObject { - URIHandler* handler; } + - (id) initWithHandler: (URIHandler*) handler; - (void) getUrl: (NSAppleEventDescriptor*) event withReplyEvent: (NSAppleEventDescriptor*) replyEvent; @end + @implementation MacOSXURIEventHandler + { + URIHandler* handler; + } + - (id) initWithHandler: (URIHandler*) h { if ((self = [super init])) { handler = h; diff --git a/Swiften/EventLoop/Cocoa/CocoaEvent.h b/Swiften/EventLoop/Cocoa/CocoaEvent.h index bede7ff..d396678 100644 --- a/Swiften/EventLoop/Cocoa/CocoaEvent.h +++ b/Swiften/EventLoop/Cocoa/CocoaEvent.h @@ -13,10 +13,7 @@ namespace Swift { class CocoaEventLoop; } -@interface CocoaEvent : NSObject { - Swift::Event* event; - Swift::CocoaEventLoop* eventLoop; -} +@interface CocoaEvent : NSObject // Takes ownership of event - (id) initWithEvent: (Swift::Event*) e eventLoop: (Swift::CocoaEventLoop*) el; diff --git a/Swiften/EventLoop/Cocoa/CocoaEvent.mm b/Swiften/EventLoop/Cocoa/CocoaEvent.mm index 049e3b6..05fd2a0 100644 --- a/Swiften/EventLoop/Cocoa/CocoaEvent.mm +++ b/Swiften/EventLoop/Cocoa/CocoaEvent.mm @@ -2,7 +2,10 @@ #include #include -@implementation CocoaEvent +@implementation CocoaEvent { + Swift::Event* event; + Swift::CocoaEventLoop* eventLoop; +} - (id) initWithEvent: (Swift::Event*) e eventLoop: (Swift::CocoaEventLoop*) el { self = [super init]; -- cgit v0.10.2-6-g49f6