Skip to content

Commit 0795976

Browse files
committed
Work around some clang-tidy warnings
1 parent 3679e60 commit 0795976

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/expire-tiles.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
expire_tiles::expire_tiles(uint32_t max_zoom,
3737
std::shared_ptr<reprojection> projection)
3838
: m_projection(std::move(projection)), m_maxzoom(max_zoom),
39-
m_map_width(1U << m_maxzoom)
39+
m_map_width(static_cast<int>(1U << m_maxzoom))
4040
{}
4141

4242
void expire_tiles::expire_tile(uint32_t x, uint32_t y)
@@ -167,7 +167,7 @@ void expire_tiles::from_line_segment(geom::point_t const &a,
167167
}
168168

169169
double const x_len = tilec_b.x() - tilec_a.x();
170-
if (x_len > m_map_width / 2) {
170+
if (x_len > m_map_width / 2) { // NOLINT(bugprone-integer-division)
171171
/* If the line is wider than half the map, assume it
172172
crosses the international date line.
173173
These coordinates get normalised again later */

0 commit comments

Comments
 (0)