@@ -34,11 +34,11 @@ static struct { Class isa; } placeholder; @interface OFDictionary () -- (OFString*)OF_JSONRepresentationWithOptions: (int)options +- (OFString *)OF_JSONRepresentationWithOptions: (int)options depth: (size_t)depth; @end @interface OFDictionary_placeholder: OFDictionary @end @@ -47,11 +47,11 @@ - init { return (id)[[OFDictionary_hashtable alloc] init]; } -- initWithDictionary: (OFDictionary*)dictionary +- initWithDictionary: (OFDictionary *)dictionary { return (id)[[OFDictionary_hashtable alloc] initWithDictionary: dictionary]; } @@ -60,19 +60,19 @@ { return (id)[[OFDictionary_hashtable alloc] initWithObject: object forKey: key]; } -- initWithObjects: (OFArray*)objects - forKeys: (OFArray*)keys +- initWithObjects: (OFArray *)objects + forKeys: (OFArray *)keys { return (id)[[OFDictionary_hashtable alloc] initWithObjects: objects forKeys: keys]; } -- initWithObjects: (id const*)objects - forKeys: (id const*)keys +- initWithObjects: (id const *)objects + forKeys: (id const *)keys count: (size_t)count { return (id)[[OFDictionary_hashtable alloc] initWithObjects: objects forKeys: keys count: count]; @@ -96,11 +96,11 @@ { return (id)[[OFDictionary_hashtable alloc] initWithKey: firstKey arguments: arguments]; } -- initWithSerialization: (OFXMLElement*)element +- initWithSerialization: (OFXMLElement *)element { return (id)[[OFDictionary_hashtable alloc] initWithSerialization: element]; } @@ -142,11 +142,11 @@ + (instancetype)dictionary { return [[[self alloc] init] autorelease]; } -+ (instancetype)dictionaryWithDictionary: (OFDictionary*)dictionary ++ (instancetype)dictionaryWithDictionary: (OFDictionary *)dictionary { return [[[self alloc] initWithDictionary: dictionary] autorelease]; } + (instancetype)dictionaryWithObject: (id)object @@ -154,19 +154,19 @@ { return [[[self alloc] initWithObject: object forKey: key] autorelease]; } -+ (instancetype)dictionaryWithObjects: (OFArray*)objects - forKeys: (OFArray*)keys ++ (instancetype)dictionaryWithObjects: (OFArray *)objects + forKeys: (OFArray *)keys { return [[[self alloc] initWithObjects: objects forKeys: keys] autorelease]; } -+ (instancetype)dictionaryWithObjects: (id const*)objects - forKeys: (id const*)keys ++ (instancetype)dictionaryWithObjects: (id const *)objects + forKeys: (id const *)keys count: (size_t)count { return [[[self alloc] initWithObjects: objects forKeys: keys count: count] autorelease]; @@ -199,11 +199,11 @@ } return [super init]; } -- initWithDictionary: (OFDictionary*)dictionary +- initWithDictionary: (OFDictionary *)dictionary { OF_INVALID_INIT_METHOD } - initWithObject: (id)object @@ -213,12 +213,12 @@ @throw [OFInvalidArgumentException exception]; return [self initWithKeysAndObjects: key, object, nil]; } -- initWithObjects: (OFArray*)objects_ - forKeys: (OFArray*)keys_ +- initWithObjects: (OFArray *)objects_ + forKeys: (OFArray *)keys_ { id const *objects, *keys; size_t count; @try { @@ -237,12 +237,12 @@ return [self initWithObjects: objects forKeys: keys count: count]; } -- initWithObjects: (id const*)objects - forKeys: (id const*)keys +- initWithObjects: (id const *)objects + forKeys: (id const *)keys count: (size_t)count { OF_INVALID_INIT_METHOD } @@ -263,11 +263,11 @@ arguments: (va_list)arguments { OF_INVALID_INIT_METHOD } -- initWithSerialization: (OFXMLElement*)element +- initWithSerialization: (OFXMLElement *)element { OF_INVALID_INIT_METHOD } - (id)objectForKey: (id)key @@ -278,11 +278,11 @@ - (id)objectForKeyedSubscript: (id)key { return [self objectForKey: key]; } -- (id)valueForKey: (OFString*)key +- (id)valueForKey: (OFString *)key { if ([key hasPrefix: @"@"]) { void *pool = objc_autoreleasePoolPush(); id ret; @@ -296,11 +296,11 @@ return [self objectForKey: key]; } - (void)setValue: (id)value - forKey: (OFString*)key + forKey: (OFString *)key { if ([key hasPrefix: @"@"]) { void *pool = objc_autoreleasePoolPush(); key = [key substringWithRange: of_range(1, [key length] - 1)]; @@ -314,12 +314,12 @@ if (![self isKindOfClass: [OFMutableDictionary class]]) @throw [OFUndefinedKeyException exceptionWithObject: self key: key value: value]; - [(OFMutableDictionary*)self setObject: value - forKey: key]; + [(OFMutableDictionary *)self setObject: value + forKey: key]; } - (size_t)count { OF_UNRECOGNIZED_SELECTOR @@ -415,11 +415,11 @@ objc_autoreleasePoolPop(pool); return false; } -- (OFArray*)allKeys +- (OFArray *)allKeys { OFMutableArray *ret = [OFMutableArray arrayWithCapacity: [self count]]; for (id key in self) [ret addObject: key]; @@ -427,11 +427,11 @@ [ret makeImmutable]; return ret; } -- (OFArray*)allObjects +- (OFArray *)allObjects { OFMutableArray *ret = [OFMutableArray arrayWithCapacity: [self count]]; void *pool = objc_autoreleasePoolPush(); OFEnumerator *enumerator = [self objectEnumerator]; id object; @@ -444,22 +444,22 @@ objc_autoreleasePoolPop(pool); return ret; } -- (OFEnumerator*)keyEnumerator +- (OFEnumerator *)keyEnumerator { OF_UNRECOGNIZED_SELECTOR } -- (OFEnumerator*)objectEnumerator +- (OFEnumerator *)objectEnumerator { OF_UNRECOGNIZED_SELECTOR } -- (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 { OF_UNRECOGNIZED_SELECTOR } @@ -475,11 +475,11 @@ if (stop) break; } } -- (OFDictionary*)mappedDictionaryUsingBlock: (of_dictionary_map_block_t)block +- (OFDictionary *)mappedDictionaryUsingBlock: (of_dictionary_map_block_t)block { OFMutableDictionary *new = [OFMutableDictionary dictionary]; [self enumerateKeysAndObjectsUsingBlock: ^ (id key, id object, bool *stop) { @@ -490,11 +490,11 @@ [new makeImmutable]; return new; } -- (OFDictionary*)filteredDictionaryUsingBlock: +- (OFDictionary *)filteredDictionaryUsingBlock: (of_dictionary_filter_block_t)block { OFMutableDictionary *new = [OFMutableDictionary dictionary]; [self enumerateKeysAndObjectsUsingBlock: ^ (id key, id object, @@ -527,11 +527,11 @@ objc_autoreleasePoolPop(pool); return hash; } -- (OFString*)description +- (OFString *)description { OFMutableString *ret; void *pool; OFEnumerator *keyEnumerator, *objectEnumerator; id key, object; @@ -568,11 +568,11 @@ objc_autoreleasePoolPop(pool); return ret; } -- (OFXMLElement*)XMLElementBySerializing +- (OFXMLElement *)XMLElementBySerializing { void *pool = objc_autoreleasePoolPush(); OFXMLElement *element; OFEnumerator *keyEnumerator, *objectEnumerator; id key, object; @@ -612,23 +612,23 @@ objc_autoreleasePoolPop(pool); return [element autorelease]; } -- (OFString*)JSONRepresentation +- (OFString *)JSONRepresentation { return [self OF_JSONRepresentationWithOptions: 0 depth: 0]; } -- (OFString*)JSONRepresentationWithOptions: (int)options +- (OFString *)JSONRepresentationWithOptions: (int)options { return [self OF_JSONRepresentationWithOptions: options depth: 0]; } -- (OFString*)OF_JSONRepresentationWithOptions: (int)options +- (OFString *)OF_JSONRepresentationWithOptions: (int)options depth: (size_t)depth { OFMutableString *JSON = [OFMutableString stringWithString: @"{"]; void *pool = objc_autoreleasePoolPush(); OFEnumerator *keyEnumerator = [self keyEnumerator]; @@ -705,11 +705,11 @@ objc_autoreleasePoolPop(pool); return JSON; } -- (OFDataArray*)messagePackRepresentation +- (OFDataArray *)messagePackRepresentation { OFDataArray *data; size_t i, count; void *pool; OFEnumerator *keyEnumerator, *objectEnumerator;