diff options
author | Aleks Kissinger <aleks0@gmail.com> | 2017-01-02 11:31:52 +0100 |
---|---|---|
committer | Aleks Kissinger <aleks0@gmail.com> | 2017-01-02 11:31:52 +0100 |
commit | ff79a9c213dfd75ea00ed5112d3a6e314601e064 (patch) | |
tree | 19ecef47bf11803fc4fc59e06c185c65aa7fdd19 /tikzit/src/common/NodeStyle.m | |
parent | 9e4f8a6ff37161da4fa0af14604ad22d9c212fde (diff) | |
parent | 49c0d2041f0aae6d08d325b7f7fc1cd707d942f8 (diff) |
Merge branch 'arc'
Diffstat (limited to 'tikzit/src/common/NodeStyle.m')
-rw-r--r-- | tikzit/src/common/NodeStyle.m | 24 |
1 files changed, 20 insertions, 4 deletions
diff --git a/tikzit/src/common/NodeStyle.m b/tikzit/src/common/NodeStyle.m index 26ab793..193d44d 100644 --- a/tikzit/src/common/NodeStyle.m +++ b/tikzit/src/common/NodeStyle.m @@ -87,12 +87,14 @@ } - (void)dealloc { +#if ! __has_feature(objc_arc) [name release]; [category release]; [shapeName release]; [strokeColorRGB release]; [fillColorRGB release]; [super dealloc]; +#endif } - (NSString*) description { @@ -110,7 +112,11 @@ } + (NodeStyle*)defaultNodeStyleWithName:(NSString*)nm { - return [[[NodeStyle alloc] initWithName:nm] autorelease]; +#if __has_feature(objc_arc) + return [[NodeStyle alloc] initWithName:nm]; +#else + return [[[NodeStyle alloc] initWithName:nm] autorelease]; +#endif } - (NSString*)name { @@ -122,7 +128,9 @@ NSString *oldValue = name; name = [s copy]; [self postPropertyChanged:@"name" oldValue:oldValue]; +#if ! __has_feature(objc_arc) [oldValue release]; +#endif } } @@ -135,7 +143,9 @@ NSString *oldValue = shapeName; shapeName = [s copy]; [self postPropertyChanged:@"shapeName" oldValue:oldValue]; +#if ! __has_feature(objc_arc) [oldValue release]; +#endif } } @@ -148,8 +158,10 @@ NSString *oldValue = category; category = [s copy]; [self postPropertyChanged:@"category" oldValue:oldValue]; +#if ! __has_feature(objc_arc) [oldValue release]; - } +#endif + } } - (int)strokeThickness { return strokeThickness; } @@ -175,8 +187,10 @@ ColorRGB *oldValue = strokeColorRGB; strokeColorRGB = [c copy]; [self postPropertyChanged:@"strokeColorRGB" oldValue:oldValue]; +#if ! __has_feature(objc_arc) [oldValue release]; - } +#endif + } } - (ColorRGB*)fillColorRGB { @@ -188,8 +202,10 @@ ColorRGB *oldValue = fillColorRGB; fillColorRGB = [c copy]; [self postPropertyChanged:@"fillColorRGB" oldValue:oldValue]; +#if ! __has_feature(objc_arc) [oldValue release]; - } +#endif + } } - (NSString*)tikz { |