@@ -57,19 +57,17 @@ va_end(arguments); return ret; } -- (instancetype)initWithObjects: (id const *)objects - count: (size_t)count +- (instancetype)initWithObjects: (id const *)objects count: (size_t)count { return (id)[[OFCountedMapTableSet alloc] initWithObjects: objects count: count]; } -- (instancetype)initWithObject: (id)firstObject - arguments: (va_list)arguments +- (instancetype)initWithObject: (id)firstObject arguments: (va_list)arguments { return (id)[[OFCountedMapTableSet alloc] initWithObject: firstObject arguments: arguments]; } @@ -158,14 +156,12 @@ if (++i < count) [ret appendString: @",\n"]; objc_autoreleasePoolPop(pool2); } - [ret replaceOccurrencesOfString: @"\n" - withString: @"\n\t"]; + [ret replaceOccurrencesOfString: @"\n" withString: @"\n\t"]; [ret appendString: @"\n)}"]; - [ret makeImmutable]; objc_autoreleasePoolPop(pool); return ret; @@ -185,11 +181,11 @@ { void *pool = objc_autoreleasePoolPush(); OFXMLElement *element; element = [OFXMLElement elementWithName: @"OFCountedSet" - namespace: OF_SERIALIZATION_NS]; + namespace: OFSerializationNS]; for (id object in self) { void *pool2 = objc_autoreleasePoolPush(); OFXMLElement *objectElement; @@ -199,11 +195,11 @@ [OFString stringWithFormat: @"%zu", [self countForObject: object]]; objectElement = [OFXMLElement elementWithName: @"object" - namespace: OF_SERIALIZATION_NS]; + namespace: OFSerializationNS]; [objectElement addAttributeWithName: @"count" stringValue: count]; [objectElement addChild: object.XMLElementBySerializing]; [element addChild: objectElement]; @@ -216,12 +212,11 @@ return [element autorelease]; } #ifdef OF_HAVE_BLOCKS -- (void)enumerateObjectsAndCountUsingBlock: - (of_counted_set_enumeration_block_t)block +- (void)enumerateObjectsAndCountUsingBlock: (OFCountedSetEnumerationBlock)block { [self enumerateObjectsUsingBlock: ^ (id object, bool *stop) { block(object, [self countForObject: object], stop); }]; }