@@ -288,17 +288,17 @@ { id const *objects, *keys; size_t count; @try { - count = [objects_ count]; + count = objects_.count; - if (count != [keys_ count]) + if (count != keys_.count) @throw [OFInvalidArgumentException exception]; - objects = [objects_ objects]; - keys = [keys_ objects]; + objects = objects_.objects; + keys = keys_.objects; } @catch (id e) { [self release]; @throw e; } @@ -352,11 +352,11 @@ { if ([key hasPrefix: @"@"]) { void *pool = objc_autoreleasePoolPush(); id ret; - key = [key substringWithRange: of_range(1, [key length] - 1)]; + key = [key substringWithRange: of_range(1, key.length - 1)]; ret = [[super valueForKey: key] retain]; objc_autoreleasePoolPop(pool); return [ret autorelease]; @@ -369,11 +369,11 @@ forKey: (OFString *)key { if ([key hasPrefix: @"@"]) { void *pool = objc_autoreleasePoolPush(); - key = [key substringWithRange: of_range(1, [key length] - 1)]; + key = [key substringWithRange: of_range(1, key.length - 1)]; [super setValue: value forKey: key]; objc_autoreleasePoolPop(pool); return; @@ -416,11 +416,11 @@ if (![object isKindOfClass: [OFDictionary class]]) return false; otherDictionary = object; - if ([otherDictionary count] != [self count]) + if (otherDictionary.count != self.count) return false; pool = objc_autoreleasePoolPush(); keyEnumerator = [self keyEnumerator]; @@ -488,11 +488,11 @@ return false; } - (OFArray *)allKeys { - OFMutableArray *ret = [OFMutableArray arrayWithCapacity: [self count]]; + OFMutableArray *ret = [OFMutableArray arrayWithCapacity: self.count]; for (id key in self) [ret addObject: key]; [ret makeImmutable]; @@ -500,11 +500,11 @@ return ret; } - (OFArray *)allObjects { - OFMutableArray *ret = [OFMutableArray arrayWithCapacity: [self count]]; + OFMutableArray *ret = [OFMutableArray arrayWithCapacity: self.count]; void *pool = objc_autoreleasePoolPush(); OFEnumerator *enumerator = [self objectEnumerator]; id object; while ((object = [enumerator nextObject]) != nil) @@ -603,12 +603,12 @@ - (OFString *)description { OFMutableString *ret; void *pool; OFEnumerator *keyEnumerator, *objectEnumerator; - id key, object; - size_t i, count = [self count]; + OFObject *key, *object; + size_t i, count = self.count; if (count == 0) return @"{}"; ret = [OFMutableString stringWithString: @"{\n"]; @@ -619,13 +619,13 @@ i = 0; while ((key = [keyEnumerator nextObject]) != nil && (object = [objectEnumerator nextObject]) != nil) { void *pool2 = objc_autoreleasePoolPush(); - [ret appendString: [key description]]; + [ret appendString: key.description]; [ret appendString: @" = "]; - [ret appendString: [object description]]; + [ret appendString: object.description]; if (++i < count) [ret appendString: @";\n"]; objc_autoreleasePoolPop(pool2); @@ -648,23 +648,23 @@ OFEnumerator *keyEnumerator = [self keyEnumerator]; OFEnumerator *objectEnumerator = [self objectEnumerator]; OFCharacterSet *allowed = [OFCharacterSet_URLQueryPartAllowed URLQueryPartAllowedCharacterSet]; bool first = true; - id key, object; + OFObject *key, *object; while ((key = [keyEnumerator nextObject]) != nil && (object = [objectEnumerator nextObject]) != nil) { if OF_UNLIKELY (first) first = false; else [ret appendString: @"&"]; - [ret appendString: [[key description] + [ret appendString: [key.description stringByURLEncodingWithAllowedCharacters: allowed]]; [ret appendString: @"="]; - [ret appendString: [[object description] + [ret appendString: [object.description stringByURLEncodingWithAllowedCharacters: allowed]]; } [ret makeImmutable]; @@ -695,16 +695,16 @@ OFXMLElement *keyElement, *objectElement; keyElement = [OFXMLElement elementWithName: @"key" namespace: OF_SERIALIZATION_NS]; - [keyElement addChild: [key XMLElementBySerializing]]; + [keyElement addChild: key.XMLElementBySerializing]; objectElement = [OFXMLElement elementWithName: @"object" namespace: OF_SERIALIZATION_NS]; - [objectElement addChild: [object XMLElementBySerializing]]; + [objectElement addChild: object.XMLElementBySerializing]; [element addChild: keyElement]; [element addChild: objectElement]; objc_autoreleasePoolPop(pool2); @@ -734,11 +734,11 @@ { OFMutableString *JSON = [OFMutableString stringWithString: @"{"]; void *pool = objc_autoreleasePoolPush(); OFEnumerator *keyEnumerator = [self keyEnumerator]; OFEnumerator *objectEnumerator = [self objectEnumerator]; - size_t i, count = [self count]; + size_t i, count = self.count; id key, object; if (options & OF_JSON_REPRESENTATION_PRETTY) { OFMutableString *indentation = [OFMutableString string]; @@ -814,14 +814,14 @@ { OFMutableData *data; size_t i, count; void *pool; OFEnumerator *keyEnumerator, *objectEnumerator; - id key, object; + id key, object; data = [OFMutableData data]; - count = [self count]; + count = self.count; if (count <= 15) { uint8_t tmp = 0x80 | ((uint8_t)count & 0xF); [data addItem: &tmp]; } else if (count <= UINT16_MAX) { @@ -851,17 +851,17 @@ void *pool2 = objc_autoreleasePoolPush(); OFData *child; i++; - child = [key messagePackRepresentation]; - [data addItems: [child items] - count: [child count]]; + child = key.messagePackRepresentation; + [data addItems: child.items + count: child.count]; - child = [object messagePackRepresentation]; - [data addItems: [child items] - count: [child count]]; + child = object.messagePackRepresentation; + [data addItems: child.items + count: child.count]; objc_autoreleasePoolPop(pool2); } assert(i == count);