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>2011-01-15 14:32:16 +0300
committerAlex Zolotarev <alex@maps.me>2015-09-23 01:09:59 +0300
commit833ded9fc5e0678cff9fdaaef99f56206ce38e1b (patch)
tree4f59ad2cc533c226a5c8f872088f0c0a485fe93c /base/stl_add.hpp
parent57c8da0f9966235dd1652eac0499642685228a5e (diff)
Add buffer_vector and use it in FeatureType for geometry storing.
Diffstat (limited to 'base/stl_add.hpp')
-rw-r--r--base/stl_add.hpp10
1 files changed, 3 insertions, 7 deletions
diff --git a/base/stl_add.hpp b/base/stl_add.hpp
index c2a3e6e88e..a17dd0e023 100644
--- a/base/stl_add.hpp
+++ b/base/stl_add.hpp
@@ -4,17 +4,15 @@
template <class ContainerT> class BackInsertFunctor
{
+ ContainerT & m_Container;
public:
explicit BackInsertFunctor(ContainerT & container) : m_Container(container)
{
}
-
void operator() (typename ContainerT::value_type const & t) const
{
- m_Container.insert(m_Container.end(), t);
+ m_Container.push_back(t);
}
-private:
- ContainerT & m_Container;
};
template <class ContainerT>
@@ -25,17 +23,15 @@ BackInsertFunctor<ContainerT> MakeBackInsertFunctor(ContainerT & container)
template <class ContainerT> class InsertFunctor
{
+ ContainerT & m_Container;
public:
explicit InsertFunctor(ContainerT & container) : m_Container(container)
{
}
-
void operator() (typename ContainerT::value_type const & t) const
{
m_Container.insert(t);
}
-private:
- ContainerT & m_Container;
};
template <class ContainerT>