diff options
author | gtm.daemon <gtm.daemon@7dc7ac4e-7543-0410-b95c-c1676fc8e2a3> | 2013-12-19 21:30:10 +0000 |
---|---|---|
committer | gtm.daemon <gtm.daemon@7dc7ac4e-7543-0410-b95c-c1676fc8e2a3> | 2013-12-19 21:30:10 +0000 |
commit | 9b8635767148b3f95942593bfeefa86f147d2c53 (patch) | |
tree | 357cf2390edbb1d150830133228cda393203ee48 /Foundation/GTMNSDictionary+CaseInsensitive.m | |
parent | ca3d74790bcf2d42bc6a9c3dc653c7e8a485705c (diff) |
Fix build of Mac GTM project with static analyzer. Remove GTMGarbageCollection. Remove GC build configs. Remove internal dependence on GTMObjectSingleton.
DELTA=447 (49 added, 296 deleted, 102 changed)
Diffstat (limited to 'Foundation/GTMNSDictionary+CaseInsensitive.m')
-rw-r--r-- | Foundation/GTMNSDictionary+CaseInsensitive.m | 21 |
1 files changed, 5 insertions, 16 deletions
diff --git a/Foundation/GTMNSDictionary+CaseInsensitive.m b/Foundation/GTMNSDictionary+CaseInsensitive.m index a207000..96494c2 100644 --- a/Foundation/GTMNSDictionary+CaseInsensitive.m +++ b/Foundation/GTMNSDictionary+CaseInsensitive.m @@ -18,7 +18,6 @@ #import "GTMNSDictionary+CaseInsensitive.h" #import "GTMDefines.h" -#import "GTMGarbageCollection.h" #import <CoreFoundation/CoreFoundation.h> @interface NSMutableDictionary (GTMNSMutableDictionaryCaseInsensitiveAdditions) @@ -85,14 +84,9 @@ static CFHashCode CaseInsensitiveHashCallback(const void *value) { keyCallbacks.equal = CaseInsensitiveEqualCallback; keyCallbacks.hash = CaseInsensitiveHashCallback; - // GTMNSMakeCollectable drops the retain count in GC mode so the object can - // be garbage collected. - // GTMNSMakeCollectable not GTMCFAutorelease because this is an initializer - // and in non-GC mode we need to return a +1 retain count object. - self = GTMNSMakeCollectable( - CFDictionaryCreate(kCFAllocatorDefault, - keys, values, count, &keyCallbacks, - &kCFTypeDictionaryValueCallBacks)); + self = (id)CFDictionaryCreate(kCFAllocatorDefault, + keys, values, count, &keyCallbacks, + &kCFTypeDictionaryValueCallBacks); free(keys); free(values); @@ -111,13 +105,8 @@ static CFHashCode CaseInsensitiveHashCallback(const void *value) { - (id)gtm_initWithDictionaryCaseInsensitive:(NSDictionary *)dictionary { if ((self = [super gtm_initWithDictionaryCaseInsensitive:dictionary])) { - // GTMNSMakeCollectable drops the retain count in GC mode so the object can - // be garbage collected. - // GTMNSMakeCollectable not GTMCFAutorelease because this is an initializer - // and in non-GC mode we need to return a +1 retain count object. - id copy = GTMNSMakeCollectable( - CFDictionaryCreateMutableCopy(kCFAllocatorDefault, 0, - (CFDictionaryRef)self)); + id copy = (id)CFDictionaryCreateMutableCopy(kCFAllocatorDefault, 0, + (CFDictionaryRef)self); [self release]; self = copy; } |