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 /search | |
parent | ce150f2169b1539eda6e845230102c8eca6e4d3a (diff) |
[std] Use new include style for coding, fixes.
Diffstat (limited to 'search')
-rw-r--r-- | search/ranking_utils.hpp | 4 | ||||
-rw-r--r-- | search/search_index_values.hpp | 9 |
2 files changed, 7 insertions, 6 deletions
diff --git a/search/ranking_utils.hpp b/search/ranking_utils.hpp index 8e75807c12..82eaa610b3 100644 --- a/search/ranking_utils.hpp +++ b/search/ranking_utils.hpp @@ -167,9 +167,9 @@ NameScore GetNameScore(std::vector<strings::UniString> const & tokens, Slice con return NAME_SCORE_FULL_MATCH; if (offset == 0) - score = max(score, NAME_SCORE_PREFIX); + score = std::max(score, NAME_SCORE_PREFIX); - score = max(score, NAME_SCORE_SUBSTRING); + score = std::max(score, NAME_SCORE_SUBSTRING); } return score; } diff --git a/search/search_index_values.hpp b/search/search_index_values.hpp index f937ee3dba..a347c5689e 100644 --- a/search/search_index_values.hpp +++ b/search/search_index_values.hpp @@ -11,6 +11,7 @@ #include <cstddef> #include <cstdint> #include <memory> +#include <utility> #include <vector> /// Following classes are supposed to be used with StringsFile. They @@ -31,7 +32,7 @@ struct FeatureIndexValue bool operator==(FeatureIndexValue const & o) const { return m_featureId == o.m_featureId; } - void Swap(FeatureIndexValue & o) { swap(m_featureId, o.m_featureId); } + void Swap(FeatureIndexValue & o) { std::swap(m_featureId, o.m_featureId); } uint64_t m_featureId = 0; }; @@ -64,9 +65,9 @@ struct FeatureWithRankAndCenter void Swap(FeatureWithRankAndCenter & o) { - swap(m_pt, o.m_pt); - swap(m_featureId, o.m_featureId); - swap(m_rank, o.m_rank); + std::swap(m_pt, o.m_pt); + std::swap(m_featureId, o.m_featureId); + std::swap(m_rank, o.m_rank); } m2::PointD m_pt; // Center point of the feature. |