Differences From Artifact [8890f1cc69]:
- File src/OFINIFile.m — part of check-in [504e13cf00] at 2017-05-13 22:38:02 on branch trunk — Reduce retain + autorelease (user: js, size: 4037) [annotate] [blame] [check-ins using]
To Artifact [6eaed9a153]:
- File
src/OFINIFile.m
— part of check-in
[6b77a5dd8b]
at
2017-05-21 21:28:57
on branch trunk
— Prefix private methods with of_ instead of OF_
This matches Apple's style. (user: js, size: 4037) [annotate] [blame] [check-ins using]
︙ | |||
25 26 27 28 29 30 31 | 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 | - + | #import "OFINICategory.h" #import "OFINICategory+Private.h" #import "OFInvalidFormatException.h" #import "OFOpenItemFailedException.h" @interface OFINIFile () |
︙ | |||
82 83 84 85 86 87 88 | 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 | - + | encoding: (of_string_encoding_t)encoding { self = [super init]; @try { _categories = [[OFMutableArray alloc] init]; |
︙ | |||
108 109 110 111 112 113 114 | 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 | - + - + | void *pool = objc_autoreleasePoolPush(); OFINICategory *category; for (category in _categories) if ([[category name] isEqual: name]) return category; |
︙ | |||
150 151 152 153 154 155 156 | 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 | - + - + | if (![line hasSuffix: @"]"]) @throw [OFInvalidFormatException exception]; categoryName = [line substringWithRange: of_range(1, [line length] - 2)]; category = [[[OFINICategory alloc] |
︙ | |||
179 180 181 182 183 184 185 | 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 | - + | { void *pool = objc_autoreleasePoolPush(); OFFile *file = [OFFile fileWithPath: path mode: @"w"]; bool first = true; for (OFINICategory *category in _categories) |