From e08fa24797df4b188188cc3fe3ec1d23f3a96814 Mon Sep 17 00:00:00 2001 From: Daria Volvenkova Date: Wed, 5 Jul 2017 11:53:18 +0300 Subject: Review fixes. --- drape_frontend/user_mark_shapes.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'drape_frontend') diff --git a/drape_frontend/user_mark_shapes.cpp b/drape_frontend/user_mark_shapes.cpp index 64a37be297..a1aaeffb87 100644 --- a/drape_frontend/user_mark_shapes.cpp +++ b/drape_frontend/user_mark_shapes.cpp @@ -134,8 +134,8 @@ void CacheUserLines(TileKey const & tileKey, ref_ptr texture dp::Batcher & batcher) { float const vs = static_cast(df::VisualParams::Instance().GetVisualScale()); - int const kLineSimplifyLevelStart = 15; - bool const simplify = tileKey.m_zoomLevel <= kLineSimplifyLevelStart; + int const kLineSimplifyLevelEnd = 15; + bool const simplify = tileKey.m_zoomLevel <= kLineSimplifyLevelEnd; double sqrScale; if (simplify) @@ -153,11 +153,11 @@ void CacheUserLines(TileKey const & tileKey, ref_ptr texture { spline.Reset(new m2::Spline(renderInfo.m_spline->GetSize())); - static double minSegmentLength = math::sqr(4.0 * vs); + static double const kMinSegmentLength = math::sqr(4.0 * vs); m2::PointD lastAddedPoint; for (auto const & point : renderInfo.m_spline->GetPath()) { - if ((spline->GetSize() > 1 && point.SquareLength(lastAddedPoint) * sqrScale < minSegmentLength) || + if ((spline->GetSize() > 1 && point.SquareLength(lastAddedPoint) * sqrScale < kMinSegmentLength) || spline->IsPrelonging(point)) { spline->ReplacePoint(point); -- cgit v1.2.3