summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTobias Markmann <tm@ayena.de>2013-08-15 12:45:13 (GMT)
committerTobias Markmann <tm@ayena.de>2013-08-15 12:45:13 (GMT)
commit88153286ea2f11fea24b950e7dbb0075ceb49a54 (patch)
treef0eccff3e37fdaf0f51583ebcedad3ad979ba645 /SwifTools
parent096aab8e39493803e14f50dc6d1f4440a9e9c55d (diff)
downloadswift-88153286ea2f11fea24b950e7dbb0075ceb49a54.zip
swift-88153286ea2f11fea24b950e7dbb0075ceb49a54.tar.bz2
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.
Diffstat (limited to 'SwifTools')
-rw-r--r--SwifTools/Cocoa/CocoaAction.h4
-rw-r--r--SwifTools/Cocoa/CocoaAction.mm12
-rw-r--r--SwifTools/URIHandler/MacOSXURIHandler.mm7
3 files changed, 14 insertions, 9 deletions
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 <Cocoa/Cocoa.h>
#include <boost/function.hpp>
-@interface CocoaAction : NSObject {
- boost::function<void ()>* 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 <SwifTools/Cocoa/CocoaAction.h>
-@implementation CocoaAction
+@implementation CocoaAction {
+ boost::function<void ()>* function;
+}
- (id) initWithFunction: (boost::function<void()>*) 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;