summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorantirez <antirez@gmail.com>2015-06-23 09:35:43 +0200
committerantirez <antirez@gmail.com>2015-06-23 09:35:43 +0200
commitae5fd11563230e06fbc637d63028b59a65e4bf51 (patch)
treefa0f8ae605f51ca7f0a7a9bbe7fcb9aace15e583
parenta3018a215f958d42224413de04f9e34387cac4c4 (diff)
downloadredis-ae5fd11563230e06fbc637d63028b59a65e4bf51.tar.gz
Geo: more x,y renamed lat,lon
-rw-r--r--src/geo.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/geo.c b/src/geo.c
index 992096a13..8720413f4 100644
--- a/src/geo.c
+++ b/src/geo.c
@@ -560,8 +560,8 @@ void geoDecodeCommand(redisClient *c) {
geohash.step = GEO_STEP_MAX;
geohashDecodeWGS84(geohash, &area);
- double y = (area.latitude.min + area.latitude.max) / 2;
- double x = (area.longitude.min + area.longitude.max) / 2;
+ double lat = (area.latitude.min + area.latitude.max) / 2;
+ double lon = (area.longitude.min + area.longitude.max) / 2;
/* Returning three nested replies */
addReplyMultiBulkLen(c, 3);
@@ -578,8 +578,8 @@ void geoDecodeCommand(redisClient *c) {
/* Last, the averaged center of this bounding box */
addReplyMultiBulkLen(c, 2);
- addReplyDouble(c, y);
- addReplyDouble(c, x);
+ addReplyDouble(c, lat);
+ addReplyDouble(c, lon);
}
void geoEncodeCommand(redisClient *c) {
@@ -613,8 +613,8 @@ void geoEncodeCommand(redisClient *c) {
GeoHashArea area;
geohashDecodeWGS84(geohash, &area);
- double y = (area.latitude.min + area.latitude.max) / 2;
- double x = (area.longitude.min + area.longitude.max) / 2;
+ double lat = (area.latitude.min + area.latitude.max) / 2;
+ double lon = (area.longitude.min + area.longitude.max) / 2;
/* Return four nested multibulk replies. */
addReplyMultiBulkLen(c, 4);
@@ -634,6 +634,6 @@ void geoEncodeCommand(redisClient *c) {
/* Return the averaged center */
addReplyMultiBulkLen(c, 2);
- addReplyDouble(c, y);
- addReplyDouble(c, x);
+ addReplyDouble(c, lat);
+ addReplyDouble(c, lon);
}