Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
redis
Commits
3961071b
Commit
3961071b
authored
Jul 06, 2016
by
antirez
Browse files
Fix signess issue in geohashEstimateStepsByRadius().
parent
504ccad1
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/geohash_helper.c
View file @
3961071b
...
...
@@ -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
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment