diff options
author | tatiana-yan <tatiana.kondakova@gmail.com> | 2019-04-12 15:52:08 +0300 |
---|---|---|
committer | mpimenov <mpimenov@users.noreply.github.com> | 2019-04-12 18:30:29 +0300 |
commit | a685936cae13b6a51028d1db0d023c5ab8ba09ca (patch) | |
tree | beaa4ed74e5283b4ed7362f6362279ba86f07946 /indexer | |
parent | ce150f2169b1539eda6e845230102c8eca6e4d3a (diff) |
[std] Use new include style for coding, fixes.
Diffstat (limited to 'indexer')
-rw-r--r-- | indexer/feature_algo.cpp | 3 | ||||
-rw-r--r-- | indexer/feature_data.hpp | 2 | ||||
-rw-r--r-- | indexer/locality_index.hpp | 3 | ||||
-rw-r--r-- | indexer/locality_index_builder.cpp | 2 | ||||
-rw-r--r-- | indexer/locality_index_builder.hpp | 6 | ||||
-rw-r--r-- | indexer/scale_index_builder.hpp | 2 | ||||
-rw-r--r-- | indexer/succinct_trie_reader.hpp | 5 |
7 files changed, 14 insertions, 9 deletions
diff --git a/indexer/feature_algo.cpp b/indexer/feature_algo.cpp index 7e2acf7209..eda2e16457 100644 --- a/indexer/feature_algo.cpp +++ b/indexer/feature_algo.cpp @@ -7,6 +7,7 @@ #include "base/logging.hpp" +#include <limits> namespace feature { @@ -42,7 +43,7 @@ m2::PointD GetCenter(FeatureType & f) { return GetCenter(f, FeatureType::BEST_GE double GetMinDistanceMeters(FeatureType & ft, m2::PointD const & pt, int scale) { - double res = numeric_limits<double>::max(); + double res = std::numeric_limits<double>::max(); auto updateDistanceFn = [&] (m2::PointD const & p) { double const d = MercatorBounds::DistanceOnEarth(p, pt); diff --git a/indexer/feature_data.hpp b/indexer/feature_data.hpp index 97dbf92bd7..f69bb11b8a 100644 --- a/indexer/feature_data.hpp +++ b/indexer/feature_data.hpp @@ -101,7 +101,7 @@ namespace feature size_t const oldSize = m_size; auto const e = std::remove_if(begin(), end(), std::forward<Fn>(fn)); - m_size = distance(begin(), e); + m_size = std::distance(begin(), e); return (m_size != oldSize); } diff --git a/indexer/locality_index.hpp b/indexer/locality_index.hpp index 94ab4380bf..711571232c 100644 --- a/indexer/locality_index.hpp +++ b/indexer/locality_index.hpp @@ -12,6 +12,7 @@ #include "base/geo_object_id.hpp" +#include <algorithm> #include <cstdint> #include <functional> #include <memory> @@ -109,7 +110,7 @@ public: auto insertObject = [&] (int64_t cellNumber, uint64_t storedId) { auto const objectId = LocalityObject::FromStoredId(storedId).GetEncodedId(); auto & objectWeight = objectWeights[objectId]; - objectWeight = max(objectWeight, cellRelativeWeight(cellNumber)); + objectWeight = std::max(objectWeight, cellRelativeWeight(cellNumber)); }; auto insertObjectWithinSizeLimit = [&](int64_t cellNumber, uint64_t storedId) { diff --git a/indexer/locality_index_builder.cpp b/indexer/locality_index_builder.cpp index 90ce5217e0..13d1cd53d2 100644 --- a/indexer/locality_index_builder.cpp +++ b/indexer/locality_index_builder.cpp @@ -9,6 +9,8 @@ #include "base/logging.hpp" +using namespace std; + namespace indexer { namespace diff --git a/indexer/locality_index_builder.hpp b/indexer/locality_index_builder.hpp index c4f4d3630a..0eaf15d8e5 100644 --- a/indexer/locality_index_builder.hpp +++ b/indexer/locality_index_builder.hpp @@ -28,10 +28,10 @@ using CoverLocality = template <class ObjectsVector, class Writer, int DEPTH_LEVELS> void BuildLocalityIndex(ObjectsVector const & objects, Writer & writer, - CoverLocality const & coverLocality, string const & tmpFilePrefix) + CoverLocality const & coverLocality, std::string const & tmpFilePrefix) { - string const cellsToValueFile = tmpFilePrefix + CELL2LOCALITY_SORTED_EXT + ".all"; - SCOPE_GUARD(cellsToValueFileGuard, bind(&FileWriter::DeleteFileX, cellsToValueFile)); + std::string const cellsToValueFile = tmpFilePrefix + CELL2LOCALITY_SORTED_EXT + ".all"; + SCOPE_GUARD(cellsToValueFileGuard, std::bind(&FileWriter::DeleteFileX, cellsToValueFile)); { FileWriter cellsToValueWriter(cellsToValueFile); diff --git a/indexer/scale_index_builder.hpp b/indexer/scale_index_builder.hpp index 7984b7392b..0f0d397674 100644 --- a/indexer/scale_index_builder.hpp +++ b/indexer/scale_index_builder.hpp @@ -51,7 +51,7 @@ public: void operator()(Feature & ft, uint32_t index) const { m_scalesIdx = 0; - uint32_t const minScaleClassif = min( + uint32_t const minScaleClassif = std::min( scales::GetUpperScale(), feature::GetMinDrawableScaleClassifOnly(feature::TypesHolder(ft))); // The classificator won't allow this feature to be drawable for smaller // scales so the first buckets can be safely skipped. diff --git a/indexer/succinct_trie_reader.hpp b/indexer/succinct_trie_reader.hpp index da8a716010..ab2fd29805 100644 --- a/indexer/succinct_trie_reader.hpp +++ b/indexer/succinct_trie_reader.hpp @@ -10,6 +10,7 @@ #include "base/macros.hpp" #include "base/string_utils.hpp" +#include <cstdint> #include <memory> #include <utility> #include <vector> @@ -142,7 +143,7 @@ public: using TValue = typename TValueReader::ValueType; using TCommonData = TopologyAndOffsets<TReader, TValueReader>; - SuccinctTrieIterator(TReader const & reader, shared_ptr<TCommonData> common, + SuccinctTrieIterator(TReader const & reader, std::shared_ptr<TCommonData> common, uint32_t nodeBitPosition) : m_reader(reader), m_common(common), m_nodeBitPosition(nodeBitPosition), m_valuesRead(false) { @@ -245,7 +246,7 @@ private: } TReader const & m_reader; - shared_ptr<TCommonData> m_common; + std::shared_ptr<TCommonData> m_common; // The bit with this 1-based index represents this node // in the external node representation of binary trie. |