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/base
diff options
context:
space:
mode:
authorVladimir Byko-Ianko <v.bykoianko@corp.mail.ru>2016-05-25 18:44:08 +0300
committerVladimir Byko-Ianko <v.bykoianko@corp.mail.ru>2016-05-27 14:17:14 +0300
commit36c26c63894dfe127d5d3ecf521e9d6a17bf20f5 (patch)
treee30be006f03c9d64e762cbd47a817139bd4ff7ca /base
parent6361f1f99a6415e528101e87433a227a42be6297 (diff)
git-clang-format
Diffstat (limited to 'base')
-rw-r--r--base/base_tests/stl_helpers_test.cpp6
-rw-r--r--base/stl_helpers.hpp6
2 files changed, 9 insertions, 3 deletions
diff --git a/base/base_tests/stl_helpers_test.cpp b/base/base_tests/stl_helpers_test.cpp
index 12130cc519..aac0393117 100644
--- a/base/base_tests/stl_helpers_test.cpp
+++ b/base/base_tests/stl_helpers_test.cpp
@@ -91,7 +91,11 @@ UNIT_TEST(SortUniquePred)
};
vector<Foo> v = {{1, 22}, {2, 33}, {1, 23}, {4, 54}, {3, 34}, {5, 23}, {2, 23}, {7, 32}, {1, 12}};
- my::SortUnique<Foo>([](Foo const & f1, Foo const & f2) { return f1.i < f2.i; }, v);
+ my::SortUnique<Foo>([](Foo const & f1, Foo const & f2)
+ {
+ return f1.i < f2.i;
+ },
+ v);
TEST_EQUAL(v.size(), 6, ());
TEST_EQUAL(v[0].i, 1, ());
diff --git a/base/stl_helpers.hpp b/base/stl_helpers.hpp
index db5cf870f0..035b77e161 100644
--- a/base/stl_helpers.hpp
+++ b/base/stl_helpers.hpp
@@ -96,8 +96,10 @@ template <typename T>
void SortUnique(function<bool(T const &, T const &)> const & comp, vector<T> & v)
{
sort(v.begin(), v.end(), comp);
- function<bool(T const &, T const &)> const pred =
- [&comp](T const &t1, T const &t2) { return !comp(t1, t2) && !comp(t2, t1); };
+ function<bool(T const &, T const &)> const pred = [&comp](T const & t1, T const & t2)
+ {
+ return !comp(t1, t2) && !comp(t2, t1);
+ };
v.erase(unique(v.begin(), v.end(), pred), v.end());
}