adium 3545:6a57340f0207: ESObjectWithProperties: We should use t...

commits at adium.im commits at adium.im
Tue Nov 16 16:39:35 UTC 2010


details:	http://hg.adium.im/adium/rev/6a57340f0207
revision:	3545:6a57340f0207
author:		Colin Barrett <colin at springsandstruts.com>
date:		Tue Nov 16 17:38:33 2010 +0100

ESObjectWithProperties: We should use the normal Objective-C pattern for setters (albeit with additional dynamic progrmaming magic). Fixes #14569.

diffs (17 lines):

diff -r 2cafa270320d -r 6a57340f0207 Frameworks/Adium Framework/Source/ESObjectWithProperties.m
--- a/Frameworks/Adium Framework/Source/ESObjectWithProperties.m	Tue Nov 16 17:25:29 2010 +0100
+++ b/Frameworks/Adium Framework/Source/ESObjectWithProperties.m	Tue Nov 16 17:38:33 2010 +0100
@@ -73,10 +73,10 @@
 {
     NSParameterAssert(key != nil);
     id oldValue = [self valueForProperty:key];
-    if ((!oldValue && !value) ||
-        (value && [value isEqual:oldValue])) //No need to do all this work just to stay the same
+    if (value == oldValue) { //No need to do all this work just to stay the same
         return;
-
+    }
+        
     [self willChangeValueForKey:key];
     	
 	Ivar ivar = class_getInstanceVariable([self class], [key UTF8String]);




More information about the commits mailing list