2020class reprojection ;
2121class table_t ;
2222class tile ;
23+
2324namespace ewkb {
2425class parser_t ;
25- }
26+ } // namespace ewkb
2627
2728/* *
2829 * \brief Simple struct for the x and y index of a tile ID.
@@ -114,11 +115,10 @@ struct expire_tiles
114115 * (larger than largest possible quadkey). */
115116 uint64_t last_quadkey = 1ULL << (2 * maxzoom);
116117 std::size_t count = 0 ;
117- for (std::vector<uint64_t >::const_iterator it = tiles_maxzoom.cbegin ();
118- it != tiles_maxzoom.cend (); ++it) {
118+ for (auto const quadkey : tiles_maxzoom) {
119119 for (uint32_t dz = 0 ; dz <= maxzoom - minzoom; ++dz) {
120120 // scale down to the current zoom level
121- uint64_t qt_current = *it >> (dz * 2 );
121+ uint64_t qt_current = quadkey >> (dz * 2 );
122122 /* If dz > 0, there are propably multiple elements whose quadkey
123123 * is equal because they are all sub-tiles of the same tile at the current
124124 * zoom level. We skip all of them after we have written the first sibling.
@@ -130,7 +130,7 @@ struct expire_tiles
130130 output_writer.output_dirty_tile (xy.x , xy.y , maxzoom - dz);
131131 ++count;
132132 }
133- last_quadkey = *it ;
133+ last_quadkey = quadkey ;
134134 }
135135 log_info (" Wrote {} entries to expired tiles list" , count);
136136 }
@@ -178,7 +178,7 @@ struct expire_tiles
178178 * \param y y index of the tile to be expired.
179179 */
180180 void expire_tile (uint32_t x, uint32_t y);
181- uint32_t normalise_tile_x_coord (int x);
181+ uint32_t normalise_tile_x_coord (int x) const ;
182182 void from_line (double lon_a, double lat_a, double lon_b, double lat_b);
183183
184184 void from_wkb_point (ewkb::parser_t *wkb);
0 commit comments