From 36c26c63894dfe127d5d3ecf521e9d6a17bf20f5 Mon Sep 17 00:00:00 2001 From: Vladimir Byko-Ianko Date: Wed, 25 May 2016 18:44:08 +0300 Subject: git-clang-format --- base/base_tests/stl_helpers_test.cpp | 6 +++++- base/stl_helpers.hpp | 6 ++++-- 2 files changed, 9 insertions(+), 3 deletions(-) (limited to 'base') 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 v = {{1, 22}, {2, 33}, {1, 23}, {4, 54}, {3, 34}, {5, 23}, {2, 23}, {7, 32}, {1, 12}}; - my::SortUnique([](Foo const & f1, Foo const & f2) { return f1.i < f2.i; }, v); + my::SortUnique([](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 void SortUnique(function const & comp, vector & v) { sort(v.begin(), v.end(), comp); - function const pred = - [&comp](T const &t1, T const &t2) { return !comp(t1, t2) && !comp(t2, t1); }; + function 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()); } -- cgit v1.2.3