diff options
author | Sergey Magidovich <mgsergio@mapswithme.com> | 2016-02-07 16:06:45 +0300 |
---|---|---|
committer | Sergey Yershov <yershov@corp.mail.ru> | 2016-03-23 16:16:53 +0300 |
commit | 54fa2ac1c7fff965b1a504a265db719cc89aafff (patch) | |
tree | 8618f54228577a0cac1b04c0cd8e1652d5b01b56 /indexer/feature.hpp | |
parent | b7b08920aa17ddb2514fc7dc83a794d7ef11a193 (diff) |
Join ForEachPoint and ForEachPointRef.
Join ForEachTriangle and ForEachTriangleRef.
Diffstat (limited to 'indexer/feature.hpp')
-rw-r--r-- | indexer/feature.hpp | 26 |
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(); } //@} |