mirror of
https://github.com/fluencelabs/redis
synced 2025-03-19 17:10:50 +00:00
Fix signess issue in geohashEstimateStepsByRadius().
This commit is contained in:
parent
504ccad1fa
commit
3961071b20
@ -80,7 +80,8 @@ uint8_t geohashEstimateStepsByRadius(double range_meters, double lat) {
|
|||||||
|
|
||||||
int geohashBitsComparator(const GeoHashBits *a, const GeoHashBits *b) {
|
int geohashBitsComparator(const GeoHashBits *a, const GeoHashBits *b) {
|
||||||
/* If step not equal, compare on step. Else, compare on bits. */
|
/* If step not equal, compare on step. Else, compare on bits. */
|
||||||
return a->step != b->step ? a->step - b->step : a->bits - b->bits;
|
return a->step != b->step ? (a->step - b->step) :
|
||||||
|
((int64_t)a->bits - (int64_t)b->bits);
|
||||||
}
|
}
|
||||||
|
|
||||||
int geohashBoundingBox(double longitude, double latitude, double radius_meters,
|
int geohashBoundingBox(double longitude, double latitude, double radius_meters,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user