mirror of
https://codeberg.org/redict/redict.git
synced 2025-01-22 16:18:28 -05: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) {
|
||||
/* 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,
|
||||
|
Loading…
Reference in New Issue
Block a user