From 950d91097d5137e3a8b660c2afc13586c7380d51 Mon Sep 17 00:00:00 2001 From: tdcosta100 Date: Thu, 9 Feb 2023 08:48:21 -0300 Subject: [PATCH] Avoid implicit casts (#787) --- test/tile/tile_coordinate.test.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/tile/tile_coordinate.test.cpp b/test/tile/tile_coordinate.test.cpp index 9ad2d1d96..762495666 100644 --- a/test/tile/tile_coordinate.test.cpp +++ b/test/tile/tile_coordinate.test.cpp @@ -94,8 +94,8 @@ TEST(TileCoordinate, ToGeometryCoordinate) { for (uint8_t zoom = 0; zoom <= 16; ++zoom) { auto maxTilesPerAxis = static_cast(std::pow(2, zoom)); for (const auto& edge : edges) { - uint32_t tileX = edge.x == 0 ? 0 : edge.x == 1 ? maxTilesPerAxis - 1 : (maxTilesPerAxis / 2.0) - 1; - uint32_t tileY = edge.y == 0 ? 0 : edge.y == 1 ? maxTilesPerAxis - 1 : (maxTilesPerAxis / 2.0) - 1; + uint32_t tileX = edge.x == 0 ? 0 : edge.x == 1 ? maxTilesPerAxis - 1 : static_cast((maxTilesPerAxis / 2.0) - 1); + uint32_t tileY = edge.y == 0 ? 0 : edge.y == 1 ? maxTilesPerAxis - 1 : static_cast((maxTilesPerAxis / 2.0) - 1); UnwrappedTileID unwrapped(0, CanonicalTileID { zoom, tileX, tileY }); auto tilePointX = ((edge.x * maxTilesPerAxis) - tileX) * util::EXTENT;