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:
authorvng <viktor.govako@gmail.com>2012-10-10 19:33:46 +0400
committerAlex Zolotarev <alex@maps.me>2015-09-23 01:45:07 +0300
commit79c59a474a84752ada349261c158dc23db9f1863 (patch)
tree96d71f808e1a3cce06301893923e4826dc5a7a11 /geometry
parent8918d30170eb2d32ad7fa10d52e5f47e1d8a74cf (diff)
Do not copy return rect in m2::AnyRect<T>::GetLocalRect().
Diffstat (limited to 'geometry')
-rw-r--r--geometry/any_rect2d.hpp2
-rw-r--r--geometry/screenbase.cpp4
2 files changed, 3 insertions, 3 deletions
diff --git a/geometry/any_rect2d.hpp b/geometry/any_rect2d.hpp
index c81a34ac38..52db34833d 100644
--- a/geometry/any_rect2d.hpp
+++ b/geometry/any_rect2d.hpp
@@ -180,7 +180,7 @@ namespace m2
pts[i] = ConvertFrom(pts[i]);
}
- Rect<T> const GetLocalRect() const
+ Rect<T> const & GetLocalRect() const
{
return m_rect;
}
diff --git a/geometry/screenbase.cpp b/geometry/screenbase.cpp
index 1c7772025c..de7f3aee72 100644
--- a/geometry/screenbase.cpp
+++ b/geometry/screenbase.cpp
@@ -233,8 +233,8 @@ void ScreenBase::PtoG(m2::RectD const & pxRect, m2::RectD & glbRect) const
bool IsPanningAndRotate(ScreenBase const & s1, ScreenBase const & s2)
{
- m2::RectD r1 = s1.GlobalRect().GetLocalRect();
- m2::RectD r2 = s2.GlobalRect().GetLocalRect();
+ m2::RectD const & r1 = s1.GlobalRect().GetLocalRect();
+ m2::RectD const & r2 = s2.GlobalRect().GetLocalRect();
m2::PointD c1 = r1.Center();
m2::PointD c2 = r2.Center();