mirror of
https://github.com/felt/tippecanoe.git
synced 2026-10-06 02:15:41 +02:00
Fix warnings about questionable numeric operations
This commit is contained in:
+2
-2
@@ -44,8 +44,8 @@ drawvec decode_geometry(FILE *meta, long long *geompos, int z, unsigned tx, unsi
|
|||||||
deserialize_long_long_io(meta, &dx, geompos);
|
deserialize_long_long_io(meta, &dx, geompos);
|
||||||
deserialize_long_long_io(meta, &dy, geompos);
|
deserialize_long_long_io(meta, &dy, geompos);
|
||||||
|
|
||||||
wx += dx << geometry_scale;
|
wx += dx * (1 << geometry_scale);
|
||||||
wy += dy << geometry_scale;
|
wy += dy * (1 << geometry_scale);
|
||||||
|
|
||||||
long long wwx = wx;
|
long long wwx = wx;
|
||||||
long long wwy = wy;
|
long long wwy = wy;
|
||||||
|
|||||||
+2
-2
@@ -38,11 +38,11 @@ void tile2latlon(long long x, long long y, int zoom, double *lat, double *lon) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
unsigned long long encode(unsigned int wx, unsigned int wy) {
|
unsigned long long encode(unsigned int wx, unsigned int wy) {
|
||||||
long long out = 0;
|
unsigned long long out = 0;
|
||||||
|
|
||||||
int i;
|
int i;
|
||||||
for (i = 0; i < 32; i++) {
|
for (i = 0; i < 32; i++) {
|
||||||
long long v = ((wx >> (32 - (i + 1))) & 1) << 1;
|
unsigned long long v = ((wx >> (32 - (i + 1))) & 1) << 1;
|
||||||
v |= (wy >> (32 - (i + 1))) & 1;
|
v |= (wy >> (32 - (i + 1))) & 1;
|
||||||
v = v << (64 - 2 * (i + 1));
|
v = v << (64 - 2 * (i + 1));
|
||||||
|
|
||||||
|
|||||||
@@ -866,7 +866,10 @@ long long write_tile(FILE *geoms, long long *geompos_in, char *metabase, char *s
|
|||||||
}
|
}
|
||||||
|
|
||||||
std::vector<coalesce> out;
|
std::vector<coalesce> out;
|
||||||
for (size_t x = 0; x < features[j].size(); x++) {
|
if (features[j].size() > 0) {
|
||||||
|
out.push_back(features[j][0]);
|
||||||
|
}
|
||||||
|
for (size_t x = 1; x < features[j].size(); x++) {
|
||||||
size_t y = out.size() - 1;
|
size_t y = out.size() - 1;
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
|
|||||||
Reference in New Issue
Block a user