summaryrefslogtreecommitdiff
path: root/src/mbgl/util
diff options
context:
space:
mode:
authorThiago Marcos P. Santos <tmpsantos@gmail.com>2020-03-20 12:38:09 +0200
committerThiago Marcos P. Santos <tmpsantos@gmail.com>2020-03-30 23:37:44 +0300
commit65f4df5190d764a12a2c8054bfce2838545917e7 (patch)
tree4b0ae8b13e19d88af1b6e3c7ae2c05d41069723c /src/mbgl/util
parent5fa7ff3b63226bda5fe18a89794c76e86f81c4f8 (diff)
downloadqtlocation-mapboxgl-65f4df5190d764a12a2c8054bfce2838545917e7.tar.gz
[core] Fix google-readability-casting errors
As reported by clang-tidy-8.
Diffstat (limited to 'src/mbgl/util')
-rw-r--r--src/mbgl/util/tile_cover_impl.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/mbgl/util/tile_cover_impl.cpp b/src/mbgl/util/tile_cover_impl.cpp
index e7181eeb5f..f97ddeff48 100644
--- a/src/mbgl/util/tile_cover_impl.cpp
+++ b/src/mbgl/util/tile_cover_impl.cpp
@@ -113,11 +113,13 @@ void build_bounds_map(PointList& points, uint32_t maxTile, BoundsMap& et, bool c
if (to_max.points.size() >= 2) {
// Projections may result in values beyond the bounds, clamp to max tile coordinates
- const auto y = static_cast<uint32_t>(std::floor(clamp(to_max.points.front().y, 0.0, (double)maxTile)));
+ const auto y =
+ static_cast<uint32_t>(std::floor(clamp(to_max.points.front().y, 0.0, static_cast<double>(maxTile))));
et[y].push_back(to_max);
}
if (to_min.points.size() >= 2) {
- const auto y = static_cast<uint32_t>(std::floor(clamp(to_min.points.front().y, 0.0, (double)maxTile)));
+ const auto y =
+ static_cast<uint32_t>(std::floor(clamp(to_min.points.front().y, 0.0, static_cast<double>(maxTile))));
et[y].push_back(to_min);
}
}
@@ -218,7 +220,7 @@ struct BuildBoundsMap {
bnd.points.insert(bnd.points.end(), 2, point);
bnd.winding = false;
BoundsMap et;
- const auto y = static_cast<uint32_t>(std::floor(clamp(point.y, 0.0, (double)(1 << zoom))));
+ const auto y = static_cast<uint32_t>(std::floor(clamp(point.y, 0.0, static_cast<double>(1 << zoom))));
et[y].push_back(bnd);
return et;
}
@@ -233,7 +235,7 @@ struct BuildBoundsMap {
}
bnd.points.insert(bnd.points.end(), 2, point);
bnd.winding = false;
- const auto y = static_cast<uint32_t>(std::floor(clamp(point.y, 0.0, (double)(1 << zoom))));
+ const auto y = static_cast<uint32_t>(std::floor(clamp(point.y, 0.0, static_cast<double>(1 << zoom))));
et[y].push_back(bnd);
}
return et;