Skip to content

Commit

Permalink
[Core] Remove unused ivar warning when arc is used compile is enabled
Browse files Browse the repository at this point in the history
  • Loading branch information
brunow committed Apr 28, 2012
1 parent 2c8b823 commit 3355a1d
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 10 deletions.
4 changes: 4 additions & 0 deletions Code/Core/BKMacrosDefinitions.h
Expand Up @@ -21,8 +21,10 @@

#if BK_HAS_ARC
#define BK_RETAIN(xx) (xx)
#define BK_RETAIN_WITHOUT_RETURN(xx)
#define BK_RELEASE(xx)
#define BK_AUTORELEASE(xx) (xx)
#define BK_AUTORELEASE_WITHOUT_RETURN(xx)
#define BK_PROP_COPY nonatomic, copy
#define BK_PROP_RETAIN strong
#define BK_RELEASE_SAFELY(xx)
Expand All @@ -37,8 +39,10 @@
#endif
#else
#define BK_RETAIN(xx) [xx retain];
#define BK_RETAIN_WITHOUT_RETURN(xx) [xx retain];
#define BK_RELEASE(xx) [xx release];
#define BK_AUTORELEASE(xx) [xx autorelease];
#define BK_AUTORELEASE_WITHOUT_RETURN(xx) [xx autorelease];
#define BK_PROP_COPY nonatomic, copy
#define BK_PROP_WEAK assign
#define BK_PROP_RETAIN retain
Expand Down
10 changes: 5 additions & 5 deletions Code/Core/BKOperationHelper.h
Expand Up @@ -45,19 +45,19 @@


/**
* Execute block on main thread
* Execute block in main thread
*
* Execute your long operation on main thread
* Execute your long operation in main thread
*
* <h3>Example</h3>
*
* @code
* [BKOperationHelper performBlockOnMainThread:^{
* [BKOperationHelper performBlockInMainThread:^{
* } waitUntilDone:NO];
* @endcode
*/
+ (void)performBlockOnMainThread:(BKBasicBlock)block waitUntilDone:(BOOL)waitUntilDone;
+ (void)performBlockInMainThread:(BKBasicBlock)block waitUntilDone:(BOOL)waitUntilDone;

+ (void)performBlockOnMainThread:(BKBasicBlock)block;
+ (void)performBlockInMainThread:(BKBasicBlock)block;

@end
6 changes: 3 additions & 3 deletions Code/Core/BKOperationHelper.m
Expand Up @@ -67,14 +67,14 @@ + (void)performBlockInBackground:(BKBasicBlock)block {


////////////////////////////////////////////////////////////////////////////////////////////////////
+ (void)performBlockOnMainThread:(BKBasicBlock)block waitUntilDone:(BOOL)waitUntilDone {
+ (void)performBlockInMainThread:(BKBasicBlock)block waitUntilDone:(BOOL)waitUntilDone {
[self performBlockInBackground:nil completion:block waitUntilDone:waitUntilDone];
}


////////////////////////////////////////////////////////////////////////////////////////////////////
+ (void)performBlockOnMainThread:(BKBasicBlock)block {
[self performBlockOnMainThread:block waitUntilDone:NO];
+ (void)performBlockInMainThread:(BKBasicBlock)block {
[self performBlockInMainThread:block waitUntilDone:NO];
}


Expand Down
1 change: 0 additions & 1 deletion Code/Core/BaseKitCore.h
Expand Up @@ -24,7 +24,6 @@
#import "BKOperationHelper.h"
#import "BKToogleValue.h"
#import "BKDeviceAvailability.h"
#import "BKRunBlockAtDealloc.h"

#import "BKUtils.h"

Expand Down
2 changes: 1 addition & 1 deletion Code/Core/NSMutableArray+BaseKit.m
Expand Up @@ -37,7 +37,7 @@ - (void)addObject:(id)anObject defaultValue:(id)defaultValue {
- (void)moveObjectFromIndex:(NSInteger)from toIndex:(NSInteger)to {
if (to != from) {
id object = [self objectAtIndex:from];
BK_RETAIN(object);
BK_RETAIN_WITHOUT_RETURN(object);

if (to >= self.count) {
[self addObject:object];
Expand Down

0 comments on commit 3355a1d

Please sign in to comment.