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:
authorSergey Magidovich <mgsergio@mapswithme.com>2016-02-07 16:06:45 +0300
committerSergey Yershov <yershov@corp.mail.ru>2016-03-23 16:16:53 +0300
commit54fa2ac1c7fff965b1a504a265db719cc89aafff (patch)
tree8618f54228577a0cac1b04c0cd8e1652d5b01b56 /indexer/feature.hpp
parentb7b08920aa17ddb2514fc7dc83a794d7ef11a193 (diff)
Join ForEachPoint and ForEachPointRef.
Join ForEachTriangle and ForEachTriangleRef.
Diffstat (limited to 'indexer/feature.hpp')
-rw-r--r--indexer/feature.hpp26
1 files changed, 7 insertions, 19 deletions
diff --git a/indexer/feature.hpp b/indexer/feature.hpp
index 4f835947fd..f6f7e84bbd 100644
--- a/indexer/feature.hpp
+++ b/indexer/feature.hpp
@@ -195,8 +195,8 @@ public:
bool IsEmptyGeometry(int scale) const;
- template <typename FunctorT>
- void ForEachPointRef(FunctorT & f, int scale) const
+ template <typename TFunctor>
+ void ForEachPoint(TFunctor && f, int scale) const
{
ParseGeometry(scale);
@@ -225,14 +225,8 @@ public:
return m_points[i];
}
- template <typename FunctorT>
- void ForEachPoint(FunctorT f, int scale) const
- {
- ForEachPointRef(f, scale);
- }
-
- template <typename FunctorT>
- void ForEachTriangleRef(FunctorT & f, int scale) const
+ template <typename TFunctor>
+ void ForEachTriangle(TFunctor && f, int scale) const
{
ParseTriangles(scale);
@@ -243,17 +237,11 @@ public:
}
}
- template <typename FunctorT>
- void ForEachTriangle(FunctorT f, int scale) const
- {
- ForEachTriangleRef(f, scale);
- }
-
- template <typename FunctorT>
- void ForEachTriangleExRef(FunctorT & f, int scale) const
+ template <typename TFunctor>
+ void ForEachTriangleEx(TFunctor && f, int scale) const
{
f.StartPrimitive(m_triangles.size());
- ForEachTriangleRef(f, scale);
+ ForEachTriangle(forward<TFunctor>(f), scale);
f.EndPrimitive();
}
//@}