@@ -104,14 +104,13 @@ } - (OFINICategory*)categoryForName: (OFString*)name { void *pool = objc_autoreleasePoolPush(); - OFEnumerator *enumerator = [_categories objectEnumerator]; OFINICategory *category; - while ((category = [enumerator nextObject]) != nil) { + for (category in _categories) { if ([[category name] isEqual: name]) { OFINICategory *ret = [category retain]; objc_autoreleasePoolPop(pool); @@ -187,18 +186,16 @@ encoding: (of_string_encoding_t)encoding { void *pool = objc_autoreleasePoolPush(); OFFile *file = [OFFile fileWithPath: path mode: @"w"]; - OFEnumerator *enumerator = [_categories objectEnumerator]; - OFINICategory *category; bool first = true; - while ((category = [enumerator nextObject]) != nil) + for (OFINICategory *category in _categories) if ([category OF_writeToStream: file encoding: encoding first: first]) first = false; objc_autoreleasePoolPop(pool); } @end