Permalink
Browse files

Apply tiny stylistic nips and tucks

  • Loading branch information...
1 parent 07c23b4 commit fcf705c701b64770deb8fc1a4111d4538dfb1107 @hatfinch committed Oct 3, 2011
Showing with 6 additions and 3 deletions.
  1. +6 −3 DGKVOBlocksObserver.m
@@ -39,6 +39,7 @@ @implementation DGKVOBlocksObserver
+ (id)observerWithQueue:(NSOperationQueue *)queue block:(DGKVOObserverBlock)block
{
id observer = [[self alloc] initWithQueue:queue block:block];
+
#if !__has_feature(objc_arc)
[observer autorelease];
#endif
@@ -61,11 +62,12 @@ - (id)initWithQueue:(NSOperationQueue *)queue block:(DGKVOObserverBlock)block
self = [super init];
if (self) {
-#if __has_feature(objc_arc)
_queue = queue;
-#else
- _queue = [queue retain];
+
+#if !__has_feature(objc_arc)
+ [queue retain];
#endif
+
_block = [block copy];
}
@@ -91,6 +93,7 @@ - (void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(N
#if !__has_feature(objc_arc)
[copiedChange release];
#endif
+
} else {
self.block(change);
}

0 comments on commit fcf705c

Please sign in to comment.