Bringing back reverted overflow changes, one at a time

This commit is contained in:
Erica Fischer
2024-03-18 12:37:24 -07:00
parent cf63945c37
commit 686ab56c4a
4 changed files with 12 additions and 12 deletions
+3 -3
View File
@@ -383,10 +383,10 @@ serial_feature parse_feature(json_pull *jp, int z, unsigned x, unsigned y, std::
// Scale and offset geometry from global to tile
double scale = 1LL << geometry_scale;
for (size_t i = 0; i < dv.size(); i++) {
unsigned sx = 0, sy = 0;
long long sx = 0, sy = 0;
if (z != 0) {
sx = x << (GLOBAL_DETAIL - z);
sy = y << (GLOBAL_DETAIL - z);
sx = (long long) x << (GLOBAL_DETAIL - z);
sy = (long long) y << (GLOBAL_DETAIL - z);
}
dv[i].x = std::round(dv[i].x / scale) * scale - sx;
dv[i].y = std::round(dv[i].y / scale) * scale - sy;