mirror of
https://github.com/mapbox/tippecanoe.git
synced 2025-04-10 04:19:54 +00:00
Fix warnings about questionable numeric operations
This commit is contained in:
parent
d4504da2f5
commit
737ae44dd7
@ -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, &dy, geompos);
|
||||
|
||||
wx += dx << geometry_scale;
|
||||
wy += dy << geometry_scale;
|
||||
wx += dx * (1 << geometry_scale);
|
||||
wy += dy * (1 << geometry_scale);
|
||||
|
||||
long long wwx = wx;
|
||||
long long wwy = wy;
|
||||
|
@ -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) {
|
||||
long long out = 0;
|
||||
unsigned long long out = 0;
|
||||
|
||||
int 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 = v << (64 - 2 * (i + 1));
|
||||
|
||||
|
5
tile.cc
5
tile.cc
@ -866,7 +866,10 @@ long long write_tile(FILE *geoms, long long *geompos_in, char *metabase, char *s
|
||||
}
|
||||
|
||||
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;
|
||||
|
||||
#if 0
|
||||
|
Loading…
x
Reference in New Issue
Block a user