From 079a238170ba4decb3e32c6e60816fb3ad380f24 Mon Sep 17 00:00:00 2001 From: "C.W. Betts" Date: Mon, 7 Oct 2019 15:32:03 -0600 Subject: [PATCH 1/2] Update DDRange.h Use NSComparisonResult for comparison. --- Core/Categories/DDRange.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Core/Categories/DDRange.h b/Core/Categories/DDRange.h index e95974a7..65efe5dc 100644 --- a/Core/Categories/DDRange.h +++ b/Core/Categories/DDRange.h @@ -44,13 +44,13 @@ FOUNDATION_EXPORT DDRange DDIntersectionRange(DDRange range1, DDRange range2); FOUNDATION_EXPORT NSString *DDStringFromRange(DDRange range); FOUNDATION_EXPORT DDRange DDRangeFromString(NSString *aString); -NSInteger DDRangeCompare(DDRangePointer pDDRange1, DDRangePointer pDDRange2); +NSComparisonResult DDRangeCompare(DDRangePointer pDDRange1, DDRangePointer pDDRange2); @interface NSValue (NSValueDDRangeExtensions) + (NSValue *)valueWithDDRange:(DDRange)range; - (DDRange)ddrangeValue; -- (NSInteger)ddrangeCompare:(NSValue *)ddrangeValue; +- (NSComparisonResult)ddrangeCompare:(NSValue *)ddrangeValue; @end From 82613ae3245d4dd541f2218d029fe012b604795b Mon Sep 17 00:00:00 2001 From: "C.W. Betts" Date: Mon, 7 Oct 2019 15:33:20 -0600 Subject: [PATCH 2/2] Update DDRange.m --- Core/Categories/DDRange.m | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Core/Categories/DDRange.m b/Core/Categories/DDRange.m index 379e7cf3..18080581 100644 --- a/Core/Categories/DDRange.m +++ b/Core/Categories/DDRange.m @@ -53,7 +53,7 @@ DDRange DDRangeFromString(NSString *aString) return result; } -NSInteger DDRangeCompare(DDRangePointer pDDRange1, DDRangePointer pDDRange2) +NSComparisonResult DDRangeCompare(DDRangePointer pDDRange1, DDRangePointer pDDRange2) { // Comparison basis: // Which range would you encouter first if you started at zero, and began walking towards infinity. @@ -93,7 +93,7 @@ - (DDRange)ddrangeValue return result; } -- (NSInteger)ddrangeCompare:(NSValue *)other +- (NSComparisonResult)ddrangeCompare:(NSValue *)other { DDRange r1 = [self ddrangeValue]; DDRange r2 = [other ddrangeValue];