@@ -27,12 +27,11 @@ #import "OFInvalidFormatException.h" #import "OFOpenItemFailedException.h" OF_DIRECT_MEMBERS @interface OFINIFile () -- (void)of_parseFile: (OFString *)path - encoding: (of_string_encoding_t)encoding; +- (void)of_parseFile: (OFString *)path encoding: (of_string_encoding_t)encoding; @end static bool isWhitespaceLine(OFString *line) { @@ -64,12 +63,11 @@ OF_INVALID_INIT_METHOD } - (instancetype)initWithPath: (OFString *)path { - return [self initWithPath: path - encoding: OF_STRING_ENCODING_UTF_8]; + return [self initWithPath: path encoding: OF_STRING_ENCODING_UTF_8]; } - (instancetype)initWithPath: (OFString *)path encoding: (of_string_encoding_t)encoding { @@ -76,12 +74,11 @@ self = [super init]; @try { _categories = [[OFMutableArray alloc] init]; - [self of_parseFile: path - encoding: encoding]; + [self of_parseFile: path encoding: encoding]; } @catch (id e) { [self release]; @throw e; } @@ -110,21 +107,19 @@ objc_autoreleasePoolPop(pool); return category; } -- (void)of_parseFile: (OFString *)path - encoding: (of_string_encoding_t)encoding +- (void)of_parseFile: (OFString *)path encoding: (of_string_encoding_t)encoding { void *pool = objc_autoreleasePoolPush(); OFFile *file; OFINICategory *category = nil; OFString *line; @try { - file = [OFFile fileWithPath: path - mode: @"r"]; + file = [OFFile fileWithPath: path mode: @"r"]; } @catch (OFOpenItemFailedException *e) { /* Handle missing file like an empty file */ if (e.errNo == ENOENT) return; @@ -158,20 +153,18 @@ objc_autoreleasePoolPop(pool); } - (void)writeToFile: (OFString *)path { - [self writeToFile: path - encoding: OF_STRING_ENCODING_UTF_8]; + [self writeToFile: path encoding: OF_STRING_ENCODING_UTF_8]; } - (void)writeToFile: (OFString *)path encoding: (of_string_encoding_t)encoding { void *pool = objc_autoreleasePoolPush(); - OFFile *file = [OFFile fileWithPath: path - mode: @"w"]; + OFFile *file = [OFFile fileWithPath: path mode: @"w"]; bool first = true; for (OFINICategory *category in _categories) if ([category of_writeToStream: file encoding: encoding