@@ -35,11 +35,11 @@ void *key, *object; uint32_t hash; }; static struct of_map_table_bucket deleted = { 0 }; -static void* +static void * defaultRetain(void *object) { return object; } @@ -59,20 +59,20 @@ { return (object1 == object2); } @interface OFMapTable () -- (void)OF_setObject: (void*)object - forKey: (void*)key +- (void)OF_setObject: (void *)object + forKey: (void *)key hash: (uint32_t)hash; @end @interface OFMapTableEnumerator () -- (instancetype)OF_initWithMapTable: (OFMapTable*)mapTable - buckets: (struct of_map_table_bucket**)buckets +- (instancetype)OF_initWithMapTable: (OFMapTable *)mapTable + buckets: (struct of_map_table_bucket **)buckets capacity: (uint32_t)capacity - mutationsPointer: (unsigned long*)mutationsPtr; + mutationsPointer: (unsigned long *)mutationsPtr; @end @interface OFMapTableKeyEnumerator: OFMapTableEnumerator @end @@ -259,11 +259,11 @@ - (size_t)count { return _count; } -- (void*)objectForKey: (void*)key +- (void *)objectForKey: (void *)key { uint32_t i, hash, last; if (key == NULL) @throw [OFInvalidArgumentException exception]; @@ -355,12 +355,12 @@ [self freeMemory: _buckets]; _buckets = buckets; _capacity = capacity; } -- (void)OF_setObject: (void*)object - forKey: (void*)key +- (void)OF_setObject: (void *)object + forKey: (void *)key hash: (uint32_t)hash { uint32_t i, last; void *old; @@ -443,19 +443,19 @@ old = _buckets[i]->object; _buckets[i]->object = _objectFunctions.retain(object); _objectFunctions.release(old); } -- (void)setObject: (void*)object - forKey: (void*)key +- (void)setObject: (void *)object + forKey: (void *)key { [self OF_setObject: object forKey: key hash: _keyFunctions.hash(key)]; } -- (void)removeObjectForKey: (void*)key +- (void)removeObjectForKey: (void *)key { uint32_t i, hash, last; if (key == NULL) @throw [OFInvalidArgumentException exception]; @@ -544,11 +544,11 @@ #else _rotate = rand() & 31; #endif } -- (bool)containsObject: (void*)object +- (bool)containsObject: (void *)object { if (object == NULL || _count == 0) return false; for (uint32_t i = 0; i < _capacity; i++) @@ -557,11 +557,11 @@ return true; return false; } -- (bool)containsObjectIdenticalTo: (void*)object +- (bool)containsObjectIdenticalTo: (void *)object { if (object == NULL || _count == 0) return false; for (uint32_t i = 0; i < _capacity; i++) @@ -570,30 +570,30 @@ return true; return false; } -- (OFMapTableEnumerator*)keyEnumerator +- (OFMapTableEnumerator *)keyEnumerator { return [[[OFMapTableKeyEnumerator alloc] OF_initWithMapTable: self buckets: _buckets capacity: _capacity mutationsPointer: &_mutations] autorelease]; } -- (OFMapTableEnumerator*)objectEnumerator +- (OFMapTableEnumerator *)objectEnumerator { return [[[OFMapTableObjectEnumerator alloc] OF_initWithMapTable: self buckets: _buckets capacity: _capacity mutationsPointer: &_mutations] autorelease]; } -- (int)countByEnumeratingWithState: (of_fast_enumeration_state_t*)state - objects: (id*)objects +- (int)countByEnumeratingWithState: (of_fast_enumeration_state_t *)state + objects: (id *)objects count: (int)count { uint32_t j = (uint32_t)state->state; int i; @@ -663,14 +663,14 @@ - init { OF_INVALID_INIT_METHOD } -- (instancetype)OF_initWithMapTable: (OFMapTable*)mapTable - buckets: (struct of_map_table_bucket**)buckets +- (instancetype)OF_initWithMapTable: (OFMapTable *)mapTable + buckets: (struct of_map_table_bucket **)buckets capacity: (uint32_t)capacity - mutationsPointer: (unsigned long*)mutationsPtr + mutationsPointer: (unsigned long *)mutationsPtr { self = [super init]; _mapTable = [mapTable retain]; _buckets = buckets; @@ -686,11 +686,11 @@ [_mapTable release]; [super dealloc]; } -- (void*)nextObject +- (void *)nextObject { OF_UNRECOGNIZED_SELECTOR } - (void)reset @@ -702,11 +702,11 @@ _position = 0; } @end @implementation OFMapTableKeyEnumerator -- (void*)nextObject +- (void *)nextObject { if (*_mutationsPtr != _mutations) @throw [OFEnumerationMutationException exceptionWithObject: _mapTable]; @@ -719,11 +719,11 @@ return NULL; } @end @implementation OFMapTableObjectEnumerator -- (void*)nextObject +- (void *)nextObject { if (*_mutationsPtr != _mutations) @throw [OFEnumerationMutationException exceptionWithObject: _mapTable]; @@ -736,11 +736,11 @@ return NULL; } @end @implementation OFMapTable_EnumeratorWrapper -- initWithEnumerator: (OFMapTableEnumerator*)enumerator +- initWithEnumerator: (OFMapTableEnumerator *)enumerator object: (id)object { self = [super init]; _enumerator = [enumerator retain];