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
path: root/search
diff options
context:
space:
mode:
authorMaxim Pimenov <m@maps.me>2018-07-23 19:29:00 +0300
committerVlad Mihaylenko <vxmihaylenko@gmail.com>2018-07-25 18:49:59 +0300
commit845af4ae26f41e86d2db9399420c19ec04b43d05 (patch)
tree6b7c4d696579d9f5b9d304dd7ed7246767244925 /search
parent4e146ec1ed8f8aed0d07ab6f0fe49d067b4c9901 (diff)
[geometry] Coding style fixes.
Diffstat (limited to 'search')
-rw-r--r--search/feature_offset_match.hpp13
-rw-r--r--search/projection_on_street.cpp9
-rw-r--r--search/search_quality/assessment_tool/result_view.hpp2
-rw-r--r--search/search_quality/sample.hpp11
4 files changed, 19 insertions, 16 deletions
diff --git a/search/feature_offset_match.hpp b/search/feature_offset_match.hpp
index 6315bd91d4..d32d138fb9 100644
--- a/search/feature_offset_match.hpp
+++ b/search/feature_offset_match.hpp
@@ -50,9 +50,8 @@ bool FindLangIndex(trie::Iterator<ValueList> const & trieRoot, uint8_t lang, uin
} // namespace
template <typename ValueList, typename DFA, typename ToDo>
-bool MatchInTrie(trie::Iterator<ValueList> const & trieRoot,
- strings::UniChar const * rootPrefix, size_t rootPrefixSize, DFA const & dfa,
- ToDo && toDo)
+bool MatchInTrie(trie::Iterator<ValueList> const & trieRoot, strings::UniChar const * rootPrefix,
+ size_t rootPrefixSize, DFA const & dfa, ToDo && toDo)
{
using TrieDFAIt = std::shared_ptr<trie::Iterator<ValueList>>;
using DFAIt = typename DFA::Iterator;
@@ -109,8 +108,10 @@ class OffsetIntersector
std::unique_ptr<Set> m_set;
public:
- explicit OffsetIntersector(Filter const &filter)
- : m_filter(filter), m_set(my::make_unique<Set>()) {}
+ explicit OffsetIntersector(Filter const & filter)
+ : m_filter(filter), m_set(my::make_unique<Set>())
+ {
+ }
void operator()(Value const & v)
{
@@ -200,7 +201,7 @@ struct SearchTrieRequest
m_langs.clear();
for (auto const lang : langs)
{
- if (lang >= 0 && lang <= numeric_limits<int8_t>::max())
+ if (lang >= 0 && lang <= std::numeric_limits<int8_t>::max())
m_langs.insert(static_cast<int8_t>(lang));
}
}
diff --git a/search/projection_on_street.cpp b/search/projection_on_street.cpp
index 492e65bd3a..049cca9f9a 100644
--- a/search/projection_on_street.cpp
+++ b/search/projection_on_street.cpp
@@ -4,10 +4,12 @@
#include "geometry/robust_orientation.hpp"
+#include <limits>
+
+using namespace std;
namespace search
{
-
// ProjectionOnStreet ------------------------------------------------------------------------------
ProjectionOnStreet::ProjectionOnStreet()
: m_proj(0, 0), m_distMeters(0), m_segIndex(0), m_projSign(false)
@@ -42,9 +44,8 @@ bool ProjectionOnStreetCalculator::GetProjection(m2::PointD const & point,
proj.m_proj = ptProj;
proj.m_distMeters = distMeters;
proj.m_segIndex = index;
- proj.m_projSign = m2::robust::OrientedS(m_segProjs[index].P0(),
- m_segProjs[index].P1(),
- point) <= 0.0;
+ proj.m_projSign =
+ m2::robust::OrientedS(m_segProjs[index].P0(), m_segProjs[index].P1(), point) <= 0.0;
}
}
diff --git a/search/search_quality/assessment_tool/result_view.hpp b/search/search_quality/assessment_tool/result_view.hpp
index b2a6b41952..f5cec97724 100644
--- a/search/search_quality/assessment_tool/result_view.hpp
+++ b/search/search_quality/assessment_tool/result_view.hpp
@@ -36,7 +36,7 @@ private:
void SetContents(std::string const & name, std::string const & type,
std::string const & address);
- QRadioButton * CreateRatioButton(string const & label, QLayout & layout);
+ QRadioButton * CreateRatioButton(std::string const & label, QLayout & layout);
void OnRelevanceChanged();
void UpdateRelevanceRadioButtons();
diff --git a/search/search_quality/sample.hpp b/search/search_quality/sample.hpp
index a2a7db4a84..0532edf093 100644
--- a/search/search_quality/sample.hpp
+++ b/search/search_quality/sample.hpp
@@ -65,15 +65,16 @@ struct Sample
std::vector<strings::UniString> m_relatedQueries;
};
-void FromJSONObject(json_t * root, string const & field, Sample::Result::Relevance & relevance);
-void ToJSONObject(json_t & root, string const & field, Sample::Result::Relevance relevance);
+void FromJSONObject(json_t * root, std::string const & field,
+ Sample::Result::Relevance & relevance);
+void ToJSONObject(json_t & root, std::string const & field, Sample::Result::Relevance relevance);
void FromJSON(json_t * root, Sample::Result & result);
my::JSONPtr ToJSON(Sample::Result const & result);
-string DebugPrint(Sample::Result::Relevance r);
+std::string DebugPrint(Sample::Result::Relevance r);
-string DebugPrint(Sample::Result const & r);
+std::string DebugPrint(Sample::Result const & r);
-string DebugPrint(Sample const & s);
+std::string DebugPrint(Sample const & s);
} // namespace search