Differences From Artifact [4f64bc6461]:
- File src/OFNumber.m — part of check-in [e29e71523e] at 2017-05-14 23:33:27 on branch trunk — OFNumber: Handle int endianess != float endianess (user: js, size: 23981) [annotate] [blame] [check-ins using]
To Artifact [30e08cc2cc]:
- File
src/OFNumber.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: 23981) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
88 89 90 91 92 93 94 | case OF_NUMBER_TYPE_DOUBLE: \ return (t)_value.double_; \ default: \ @throw [OFInvalidFormatException exception]; \ } @interface OFNumber () | | | 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 | case OF_NUMBER_TYPE_DOUBLE: \ return (t)_value.double_; \ default: \ @throw [OFInvalidFormatException exception]; \ } @interface OFNumber () - (OFString *)of_JSONRepresentationWithOptions: (int)options depth: (size_t)depth; @end @implementation OFNumber @synthesize type = _type; + (instancetype)numberWithBool: (bool)bool_ |
︙ | ︙ | |||
1012 1013 1014 1015 1016 1017 1018 | objc_autoreleasePoolPop(pool); return [element autorelease]; } - (OFString *)JSONRepresentation { | | | | | 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 | objc_autoreleasePoolPop(pool); return [element autorelease]; } - (OFString *)JSONRepresentation { return [self of_JSONRepresentationWithOptions: 0 depth: 0]; } - (OFString *)JSONRepresentationWithOptions: (int)options { return [self of_JSONRepresentationWithOptions: options depth: 0]; } - (OFString *)of_JSONRepresentationWithOptions: (int)options depth: (size_t)depth { double doubleValue; if (_type == OF_NUMBER_TYPE_BOOL) return (_value.bool_ ? @"true" : @"false"); |
︙ | ︙ |