diff --git a/indexer/geometry_coding.cpp b/indexer/geometry_coding.cpp index 502ff17d6c..5c41176501 100644 --- a/indexer/geometry_coding.cpp +++ b/indexer/geometry_coding.cpp @@ -11,12 +11,14 @@ namespace { - template - inline m2::PointU ClampPoint(m2::PointU const & maxPoint, m2::Point const & point) + inline m2::PointU ClampPoint(m2::PointU const & maxPoint, m2::Point const & point) { typedef m2::PointU::value_type uvalue_t; - return m2::PointU(my::clamp(static_cast(point.x), static_cast(0), maxPoint.x), - my::clamp(static_cast(point.y), static_cast(0), maxPoint.y)); + //return m2::PointU(my::clamp(static_cast(point.x), static_cast(0), maxPoint.x), + // my::clamp(static_cast(point.y), static_cast(0), maxPoint.y)); + + return m2::PointU(static_cast(my::clamp(point.x, 0.0, static_cast(maxPoint.x))), + static_cast(my::clamp(point.y, 0.0, static_cast(maxPoint.y)))); } }