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:
authortatiana-yan <tatiana.kondakova@gmail.com>2019-05-22 12:21:37 +0300
committermpimenov <mpimenov@users.noreply.github.com>2019-05-22 13:53:14 +0300
commitf60cb4805f4a1318078915ad17fdec7146af10d5 (patch)
tree047c4e953d9181a334d24229a74d9559129734d6 /storage
parent04394def48acc692bdf38184c383d47992f2b0b5 (diff)
[storage][style] Style fixes.
Diffstat (limited to 'storage')
-rw-r--r--storage/country_info_getter.hpp6
-rw-r--r--storage/country_tree.hpp36
2 files changed, 22 insertions, 20 deletions
diff --git a/storage/country_info_getter.hpp b/storage/country_info_getter.hpp
index cf55560e4b..c37c2e9eab 100644
--- a/storage/country_info_getter.hpp
+++ b/storage/country_info_getter.hpp
@@ -13,6 +13,7 @@
#include "base/cache.hpp"
#include <map>
+#include <memory>
#include <mutex>
#include <string>
#include <type_traits>
@@ -137,13 +138,14 @@ class CountryInfoReader : public CountryInfoGetter
{
public:
/// \returns CountryInfoGetter based on countries.txt and packed_polygons.bin.
- static unique_ptr<CountryInfoGetter> CreateCountryInfoReader(Platform const & platform);
+ static std::unique_ptr<CountryInfoGetter> CreateCountryInfoReader(Platform const & platform);
/// \returns CountryInfoGetter based on countries_obsolete.txt and packed_polygons_obsolete.bin.
/// \brief The polygons in CountryInfoGetter() returned by the method was used at the time when
/// routing and map data were in different files.
/// \note This method should be used before migration to single-component and for tests.
- static unique_ptr<CountryInfoGetter> CreateCountryInfoReaderObsolete(Platform const & platform);
+ static std::unique_ptr<CountryInfoGetter> CreateCountryInfoReaderObsolete(
+ Platform const & platform);
protected:
CountryInfoReader(ModelReaderPtr polyR, ModelReaderPtr countryR);
diff --git a/storage/country_tree.hpp b/storage/country_tree.hpp
index dc72e6b84c..4239ba8c32 100644
--- a/storage/country_tree.hpp
+++ b/storage/country_tree.hpp
@@ -2,10 +2,11 @@
#include "base/assert.hpp"
-#include "std/algorithm.hpp"
-#include "std/map.hpp"
-#include "std/unique_ptr.hpp"
-#include "std/vector.hpp"
+#include <algorithm>
+#include <functional>
+#include <map>
+#include <memory>
+#include <vector>
/// \brief This class is developed for using in Storage. It's a implementation of a tree with
/// ability
@@ -30,12 +31,12 @@ public:
/// \brief m_children contains all first generation descendants of the node.
/// Note. Once created the order of elements of |m_children| should not be changed.
/// See implementation of AddAtDepth and Add methods for details.
- vector<unique_ptr<Node>> m_children;
+ std::vector<std::unique_ptr<Node>> m_children;
Node * m_parent;
Node * Add(TValue const & value)
{
- m_children.emplace_back(make_unique<Node>(value, this));
+ m_children.emplace_back(std::make_unique<Node>(value, this));
return m_children.back().get();
}
@@ -156,7 +157,7 @@ public:
};
private:
- using TCountryTreeHashTable = multimap<TKey, Node *>;
+ using CountryTreeHashTable = std::multimap<TKey, Node *>;
public:
bool IsEmpty() const { return m_countryTree == nullptr; }
@@ -179,7 +180,7 @@ public:
if (level == 0)
{
ASSERT(IsEmpty(), ());
- m_countryTree = make_unique<Node>(value, nullptr); // Creating the root node.
+ m_countryTree = std::make_unique<Node>(value, nullptr); // Creating the root node.
added = m_countryTree.get();
}
else
@@ -202,7 +203,7 @@ public:
/// \brief Checks all nodes in tree to find an equal one. If there're several equal nodes
/// returns the first found.
/// \returns a poiter item in the tree if found and nullptr otherwise.
- void Find(TKey const & key, vector<Node const *> & found) const
+ void Find(TKey const & key, std::vector<Node const *> & found) const
{
found.clear();
if (IsEmpty())
@@ -215,11 +216,10 @@ public:
if (range.first == range.second)
return;
- for_each(range.first, range.second,
- [&found](typename TCountryTreeHashTable::value_type const & node)
- {
- found.push_back(node.second);
- });
+ std::for_each(range.first, range.second,
+ [&found](typename CountryTreeHashTable::value_type const & node) {
+ found.push_back(node.second);
+ });
}
Node const * const FindFirst(TKey const & key) const
@@ -227,7 +227,7 @@ public:
if (IsEmpty())
return nullptr;
- vector<Node const *> found;
+ std::vector<Node const *> found;
Find(key, found);
if (found.empty())
return nullptr;
@@ -244,7 +244,7 @@ public:
if (IsEmpty())
return nullptr;
- vector<Node const *> found;
+ std::vector<Node const *> found;
Find(key, found);
for (auto node : found)
@@ -256,6 +256,6 @@ public:
}
private:
- unique_ptr<Node> m_countryTree;
- TCountryTreeHashTable m_countryTreeHashTable;
+ std::unique_ptr<Node> m_countryTree;
+ CountryTreeHashTable m_countryTreeHashTable;
};