@@ -1554,18 +1554,18 @@ - (id)mutableCopy { return [[OFMutableString alloc] initWithString: self]; } -- (of_comparison_result_t)compare: (OFString *)string +- (OFComparisonResult)compare: (OFString *)string { void *pool; const of_unichar_t *characters, *otherCharacters; size_t minimumLength; if (string == self) - return OF_ORDERED_SAME; + return OFOrderedSame; if (![string isKindOfClass: [OFString class]]) @throw [OFInvalidArgumentException exception]; minimumLength = (self.length > string.length @@ -1577,37 +1577,37 @@ otherCharacters = string.characters; for (size_t i = 0; i < minimumLength; i++) { if (characters[i] > otherCharacters[i]) { objc_autoreleasePoolPop(pool); - return OF_ORDERED_DESCENDING; + return OFOrderedDescending; } if (characters[i] < otherCharacters[i]) { objc_autoreleasePoolPop(pool); - return OF_ORDERED_ASCENDING; + return OFOrderedAscending; } } objc_autoreleasePoolPop(pool); if (self.length > string.length) - return OF_ORDERED_DESCENDING; + return OFOrderedDescending; if (self.length < string.length) - return OF_ORDERED_ASCENDING; + return OFOrderedAscending; - return OF_ORDERED_SAME; + return OFOrderedSame; } -- (of_comparison_result_t)caseInsensitiveCompare: (OFString *)string +- (OFComparisonResult)caseInsensitiveCompare: (OFString *)string { void *pool = objc_autoreleasePoolPush(); const of_unichar_t *characters, *otherCharacters; size_t length, otherLength, minimumLength; if (string == self) - return OF_ORDERED_SAME; + return OFOrderedSame; characters = self.characters; otherCharacters = string.characters; length = self.length; otherLength = string.length; @@ -1638,26 +1638,26 @@ oc = of_ascii_toupper(oc); #endif if (c > oc) { objc_autoreleasePoolPop(pool); - return OF_ORDERED_DESCENDING; + return OFOrderedDescending; } if (c < oc) { objc_autoreleasePoolPop(pool); - return OF_ORDERED_ASCENDING; + return OFOrderedAscending; } } objc_autoreleasePoolPop(pool); if (length > otherLength) - return OF_ORDERED_DESCENDING; + return OFOrderedDescending; if (length < otherLength) - return OF_ORDERED_ASCENDING; + return OFOrderedAscending; - return OF_ORDERED_SAME; + return OFOrderedSame; } - (unsigned long)hash { const of_unichar_t *characters = self.characters; @@ -2419,19 +2419,19 @@ - (float)floatValue { void *pool = objc_autoreleasePoolPush(); OFString *stripped = self.stringByDeletingEnclosingWhitespaces; - if ([stripped caseInsensitiveCompare: @"INF"] == OF_ORDERED_SAME || - [stripped caseInsensitiveCompare: @"INFINITY"] == OF_ORDERED_SAME) + if ([stripped caseInsensitiveCompare: @"INF"] == OFOrderedSame || + [stripped caseInsensitiveCompare: @"INFINITY"] == OFOrderedSame) return INFINITY; - if ([stripped caseInsensitiveCompare: @"-INF"] == OF_ORDERED_SAME || - [stripped caseInsensitiveCompare: @"-INFINITY"] == OF_ORDERED_SAME) + if ([stripped caseInsensitiveCompare: @"-INF"] == OFOrderedSame || + [stripped caseInsensitiveCompare: @"-INFINITY"] == OFOrderedSame) return -INFINITY; - if ([stripped caseInsensitiveCompare: @"NAN"] == OF_ORDERED_SAME) + if ([stripped caseInsensitiveCompare: @"NAN"] == OFOrderedSame) return NAN; - if ([stripped caseInsensitiveCompare: @"-NAN"] == OF_ORDERED_SAME) + if ([stripped caseInsensitiveCompare: @"-NAN"] == OFOrderedSame) return -NAN; #ifdef HAVE_STRTOF_L const char *UTF8String = self.UTF8String; #else @@ -2472,19 +2472,19 @@ - (double)doubleValue { void *pool = objc_autoreleasePoolPush(); OFString *stripped = self.stringByDeletingEnclosingWhitespaces; - if ([stripped caseInsensitiveCompare: @"INF"] == OF_ORDERED_SAME || - [stripped caseInsensitiveCompare: @"INFINITY"] == OF_ORDERED_SAME) + if ([stripped caseInsensitiveCompare: @"INF"] == OFOrderedSame || + [stripped caseInsensitiveCompare: @"INFINITY"] == OFOrderedSame) return INFINITY; - if ([stripped caseInsensitiveCompare: @"-INF"] == OF_ORDERED_SAME || - [stripped caseInsensitiveCompare: @"-INFINITY"] == OF_ORDERED_SAME) + if ([stripped caseInsensitiveCompare: @"-INF"] == OFOrderedSame || + [stripped caseInsensitiveCompare: @"-INFINITY"] == OFOrderedSame) return -INFINITY; - if ([stripped caseInsensitiveCompare: @"NAN"] == OF_ORDERED_SAME) + if ([stripped caseInsensitiveCompare: @"NAN"] == OFOrderedSame) return NAN; - if ([stripped caseInsensitiveCompare: @"-NAN"] == OF_ORDERED_SAME) + if ([stripped caseInsensitiveCompare: @"-NAN"] == OFOrderedSame) return -NAN; #ifdef HAVE_STRTOD_L const char *UTF8String = self.UTF8String; #else