diff --git a/src/mbgl/text/collision_index.cpp b/src/mbgl/text/collision_index.cpp index f060a015eeb..8924aa0a197 100644 --- a/src/mbgl/text/collision_index.cpp +++ b/src/mbgl/text/collision_index.cpp @@ -122,22 +122,22 @@ IntersectStatus CollisionIndex::intersectsTileEdges(const CollisionBox& box, const float tileY2 = tileEdges[3]; // Check left border - int minSectionLength = std::min(tileX1 - x1, x2 - tileX1); + int minSectionLength = static_cast(std::min(tileX1 - x1, x2 - tileX1)); if (minSectionLength <= 0) { // Check right border - minSectionLength = std::min(tileX2 - x1, x2 - tileX2); + minSectionLength = static_cast(std::min(tileX2 - x1, x2 - tileX2)); } if (minSectionLength > 0) { result.flags |= IntersectStatus::VerticalBorders; - result.minSectionLength = static_cast(minSectionLength); + result.minSectionLength = minSectionLength; } // Check top border - minSectionLength = std::min(tileY1 - y1, y2 - tileY1); + minSectionLength = static_cast(std::min(tileY1 - y1, y2 - tileY1)); if (minSectionLength <= 0) { // Check bottom border - minSectionLength = std::min(tileY2 - y1, y2 - tileY2); + minSectionLength = static_cast(std::min(tileY2 - y1, y2 - tileY2)); } if (minSectionLength > 0) { result.flags |= IntersectStatus::HorizontalBorders; - result.minSectionLength = std::min(result.minSectionLength, static_cast(minSectionLength)); + result.minSectionLength = static_cast(std::min(result.minSectionLength, minSectionLength)); } return result; }