From f2ced94e30227052fe39f81b1379e270bb260fea Mon Sep 17 00:00:00 2001 From: Erica Fischer Date: Wed, 24 Jan 2024 11:41:59 -0800 Subject: [PATCH] Fix some warnings --- pmtiles/pmtiles.hpp | 4 ++-- tile-join.cpp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/pmtiles/pmtiles.hpp b/pmtiles/pmtiles.hpp index 01a1a19f..3d613995 100644 --- a/pmtiles/pmtiles.hpp +++ b/pmtiles/pmtiles.hpp @@ -166,7 +166,7 @@ struct entryv3 { } }; -struct { +static struct { bool operator()(entryv3 a, entryv3 b) const { return a.tile_id < b.tile_id; } @@ -388,7 +388,7 @@ inline uint64_t zxy_to_tileid(uint8_t z, uint32_t x, uint32_t y) { if (z > 31) { throw std::overflow_error("tile zoom exceeds 64-bit limit"); } - if (x > (1 << z) - 1 || y > (1 << z) - 1) { + if (x > (1U << z) - 1 || y > (1U << z) - 1) { throw std::overflow_error("tile x/y outside zoom level bounds"); } uint64_t acc = 0; diff --git a/tile-join.cpp b/tile-join.cpp index 8492e8f7..12cbfc03 100644 --- a/tile-join.cpp +++ b/tile-join.cpp @@ -688,8 +688,8 @@ struct tileset_reader { perror("pthread_mutex_lock"); } - std::function getter = [&](zxy tile) { - return get_tile(tile); + std::function getter = [&](zxy tileno) { + return get_tile(tileno); }; mvt_tile source = cache.get(parent_tile, getter);