Skip to content

Commit

Permalink
fix warnning in pika_geohash
Browse files Browse the repository at this point in the history
  • Loading branch information
CatKang committed Feb 23, 2017
1 parent 6131657 commit c117840
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/pika_geohash.cc
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ int geohashEncode(const GeoHashRange *long_range, const GeoHashRange *lat_range,
}

int geohashEncodeType(double longitude, double latitude, uint8_t step, GeoHashBits *hash) {
GeoHashRange r[2] = {{0}};
GeoHashRange r[2] = {GeoHashRange()};
geohashGetCoordRange(&r[0], &r[1]);
return geohashEncode(&r[0], &r[1], longitude, latitude, step, hash);
}
Expand Down Expand Up @@ -194,7 +194,7 @@ int geohashDecode(const GeoHashRange long_range, const GeoHashRange lat_range,
}

int geohashDecodeType(const GeoHashBits hash, GeoHashArea *area) {
GeoHashRange r[2] = {{0}};
GeoHashRange r[2] = {GeoHashRange()};
geohashGetCoordRange(&r[0], &r[1]);
return geohashDecode(r[0], r[1], hash, area);
}
Expand All @@ -211,7 +211,7 @@ int geohashDecodeAreaToLongLat(const GeoHashArea *area, double *xy) {
}

int geohashDecodeToLongLatType(const GeoHashBits hash, double *xy) {
GeoHashArea area = {{0}};
GeoHashArea area = GeoHashArea();
if (!xy || !geohashDecodeType(hash, &area))
return 0;
return geohashDecodeAreaToLongLat(&area, xy);
Expand Down

0 comments on commit c117840

Please sign in to comment.