Differences From Artifact [6f7f003a8d]:
- File src/OFINICategory.m — part of check-in [b6cb3addd0] at 2020-06-28 15:03:23 on branch trunk — Use OF_DIRECT(_MEMBERS) where appropriate (user: js, size: 10909) [annotate] [blame] [check-ins using] [more...]
To Artifact [4145f33ae0]:
- File
src/OFINICategory.m
— part of check-in
[b6ee372b98]
at
2020-08-11 19:45:36
on branch trunk
— OFString: Rework number parsing API
This solves the old signed vs. unsigned problem and allows for more
bases than just 8, 10 and 16, as well as auto-detection of the base (if
base is 0). (user: js, size: 10825) [annotate] [blame] [check-ins using] [more...]
︙ | ︙ | |||
205 206 207 208 209 210 211 | if ([pair->_key isEqual: key]) return [[pair->_value copy] autorelease]; } return defaultValue; } | | | | | < | | < < | 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 | if ([pair->_key isEqual: key]) return [[pair->_value copy] autorelease]; } return defaultValue; } - (long long)integerForKey: (OFString *)key defaultValue: (long long)defaultValue { void *pool = objc_autoreleasePoolPush(); OFString *value = [self stringForKey: key defaultValue: nil]; long long ret; if (value != nil) ret = [value longLongValueWithBase: 0]; else ret = defaultValue; objc_autoreleasePoolPop(pool); return ret; } |
︙ | ︙ | |||
350 351 352 353 354 355 356 | @throw e; } objc_autoreleasePoolPop(pool); } | | | | 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 | @throw e; } objc_autoreleasePoolPop(pool); } - (void)setInteger: (long long)integer forKey: (OFString *)key { void *pool = objc_autoreleasePoolPush(); [self setString: [OFString stringWithFormat: @"%lld", integer] forKey: key]; objc_autoreleasePoolPop(pool); } - (void)setBool: (bool)bool_ forKey: (OFString *)key |
︙ | ︙ |