Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mapsme/omim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaxim Pimenov <m@maps.me>2018-07-11 17:17:11 +0300
committerVlad Mihaylenko <vxmihaylenko@gmail.com>2018-07-23 18:54:18 +0300
commit8bcd254bdc661276c733c278a640973f3a4d7647 (patch)
tree437255344c758618448c3eb2ca56094d35cfa5b4 /drape_frontend
parent08f38bd4fba8623603ec406307d715993aab4eed (diff)
[geometry] Renamed SquareLength to SquaredLength.
Diffstat (limited to 'drape_frontend')
-rw-r--r--drape_frontend/apply_feature_functors.cpp2
-rwxr-xr-xdrape_frontend/frontend_renderer.cpp2
-rw-r--r--drape_frontend/path_text_handle.cpp2
-rw-r--r--drape_frontend/user_event_stream.cpp6
-rw-r--r--drape_frontend/user_mark_shapes.cpp2
5 files changed, 7 insertions, 7 deletions
diff --git a/drape_frontend/apply_feature_functors.cpp b/drape_frontend/apply_feature_functors.cpp
index 3402d98088..f91c8818d8 100644
--- a/drape_frontend/apply_feature_functors.cpp
+++ b/drape_frontend/apply_feature_functors.cpp
@@ -876,7 +876,7 @@ void ApplyLineFeatureGeometry::operator() (m2::PointD const & point)
{
static double minSegmentLength = pow(4.0 * df::VisualParams::Instance().GetVisualScale(), 2);
if (m_simplify &&
- ((m_spline->GetSize() > 1 && point.SquareLength(m_lastAddedPoint) * m_sqrScale < minSegmentLength) ||
+ ((m_spline->GetSize() > 1 && point.SquaredLength(m_lastAddedPoint) * m_sqrScale < minSegmentLength) ||
m_spline->IsPrelonging(point)))
{
m_spline->ReplacePoint(point);
diff --git a/drape_frontend/frontend_renderer.cpp b/drape_frontend/frontend_renderer.cpp
index 077e8e2eeb..b59fd2f198 100755
--- a/drape_frontend/frontend_renderer.cpp
+++ b/drape_frontend/frontend_renderer.cpp
@@ -1128,7 +1128,7 @@ FeatureID FrontendRenderer::GetVisiblePOI(m2::RectD const & pixelRect)
FeatureID featureID;
for (ref_ptr<dp::OverlayHandle> handle : selectResult)
{
- double const curDist = pt.SquareLength(handle->GetPivot(screen, screen.isPerspective()));
+ double const curDist = pt.SquaredLength(handle->GetPivot(screen, screen.isPerspective()));
if (curDist < dist)
{
dist = curDist;
diff --git a/drape_frontend/path_text_handle.cpp b/drape_frontend/path_text_handle.cpp
index 403814605b..0fae95e0f2 100644
--- a/drape_frontend/path_text_handle.cpp
+++ b/drape_frontend/path_text_handle.cpp
@@ -228,7 +228,7 @@ m2::Spline::iterator PathTextContext::GetProjectedPoint(std::vector<m2::Spline>
nearestStep = step + t;
}
- double const dist = pt.SquareLength(nearestPt);
+ double const dist = pt.SquaredLength(nearestPt);
if (dist < minDist)
{
minDist = dist;
diff --git a/drape_frontend/user_event_stream.cpp b/drape_frontend/user_event_stream.cpp
index 69eebcfc9d..66b3306ac7 100644
--- a/drape_frontend/user_event_stream.cpp
+++ b/drape_frontend/user_event_stream.cpp
@@ -765,7 +765,7 @@ bool UserEventStream::TouchDown(array<Touch, 2> const & touches)
bool UserEventStream::CheckDrag(array<Touch, 2> const & touches, double threshold) const
{
- return m_startDragOrg.SquareLength(m2::PointD(touches[0].m_location)) > threshold;
+ return m_startDragOrg.SquaredLength(m2::PointD(touches[0].m_location)) > threshold;
}
bool UserEventStream::TouchMove(array<Touch, 2> const & touches)
@@ -796,8 +796,8 @@ bool UserEventStream::TouchMove(array<Touch, 2> const & touches)
if (touchCount == 2)
{
auto const threshold = static_cast<float>(kDragThreshold);
- if (m_twoFingersTouches[0].SquareLength(touches[0].m_location) > threshold ||
- m_twoFingersTouches[1].SquareLength(touches[1].m_location) > threshold)
+ if (m_twoFingersTouches[0].SquaredLength(touches[0].m_location) > threshold ||
+ m_twoFingersTouches[1].SquaredLength(touches[1].m_location) > threshold)
BeginScale(touches[0], touches[1]);
else
isMapTouch = false;
diff --git a/drape_frontend/user_mark_shapes.cpp b/drape_frontend/user_mark_shapes.cpp
index c91fd3beb8..b3338de24b 100644
--- a/drape_frontend/user_mark_shapes.cpp
+++ b/drape_frontend/user_mark_shapes.cpp
@@ -256,7 +256,7 @@ m2::SharedSpline SimplifySpline(UserLineRenderParams const & renderInfo, double
m2::PointD lastAddedPoint;
for (auto const & point : renderInfo.m_spline->GetPath())
{
- if (spline->GetSize() > 1 && point.SquareLength(lastAddedPoint) * sqrScale < kMinSegmentLength)
+ if (spline->GetSize() > 1 && point.SquaredLength(lastAddedPoint) * sqrScale < kMinSegmentLength)
{
spline->ReplacePoint(point);
}