Skip to content

Commit 9703cae

Browse files
authored
Fix -[FIRGeoPoint compare:] analysis warning (#3121)
1 parent d2fd372 commit 9703cae

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

Firestore/Source/API/FIRGeoPoint.mm

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -48,15 +48,6 @@ - (instancetype)initWithLatitude:(double)latitude longitude:(double)longitude {
4848
return self;
4949
}
5050

51-
- (NSComparisonResult)compare:(FIRGeoPoint *)other {
52-
NSComparisonResult result = WrapCompare<double>(self.latitude, other.latitude);
53-
if (result != NSOrderedSame) {
54-
return result;
55-
} else {
56-
return WrapCompare<double>(self.longitude, other.longitude);
57-
}
58-
}
59-
6051
#pragma mark - NSObject methods
6152

6253
- (NSString *)description {
@@ -88,6 +79,15 @@ - (id)copyWithZone:(NSZone *_Nullable)zone {
8879

8980
@implementation FIRGeoPoint (Internal)
9081

82+
- (NSComparisonResult)compare:(FIRGeoPoint *)other {
83+
NSComparisonResult result = WrapCompare<double>(self.latitude, other.latitude);
84+
if (result != NSOrderedSame) {
85+
return result;
86+
} else {
87+
return WrapCompare<double>(self.longitude, other.longitude);
88+
}
89+
}
90+
9191
- (firestore::GeoPoint)toGeoPoint {
9292
return firestore::GeoPoint(self.latitude, self.longitude);
9393
}

0 commit comments

Comments
 (0)