Fix the warnings better

This commit is contained in:
Erica Fischer
2024-01-24 11:44:50 -08:00
parent f2ced94e30
commit 16560f8ae8
3 changed files with 4 additions and 4 deletions
+1 -1
View File
@@ -277,7 +277,7 @@ void decode(char *fname, int z, unsigned x, unsigned y, std::set<std::string> co
struct stat st; struct stat st;
std::vector<zxy> tiles; std::vector<zxy> tiles;
char *pmtiles_map; char *pmtiles_map = NULL;
std::vector<pmtiles::entry_zxy> entries; std::vector<pmtiles::entry_zxy> entries;
bool is_pmtiles = false; bool is_pmtiles = false;
+2 -2
View File
@@ -166,11 +166,11 @@ struct entryv3 {
} }
}; };
static struct { struct entryv3_cmp {
bool operator()(entryv3 a, entryv3 b) const { bool operator()(entryv3 a, entryv3 b) const {
return a.tile_id < b.tile_id; return a.tile_id < b.tile_id;
} }
} entryv3_cmp; };
struct entry_zxy { struct entry_zxy {
uint8_t z; uint8_t z;
+1 -1
View File
@@ -263,7 +263,7 @@ void mbtiles_map_image_to_pmtiles(char *fname, metadata m, bool tile_compression
// finalize PMTiles archive. // finalize PMTiles archive.
{ {
std::sort(entries.begin(), entries.end(), pmtiles::entryv3_cmp); std::sort(entries.begin(), entries.end(), pmtiles::entryv3_cmp());
std::string root_bytes; std::string root_bytes;
std::string leaves_bytes; std::string leaves_bytes;