aboutsummaryrefslogtreecommitdiffstats
path: root/util/generic/algorithm.h
diff options
context:
space:
mode:
authora-bocharov <a-bocharov@yandex-team.ru>2022-02-10 16:51:42 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:51:42 +0300
commite826ebc0dee525ef263356dece4e470c3303cc7a (patch)
treeab7fbbf3253d4c0e2793218f09378908beb025fb /util/generic/algorithm.h
parentcf85d9ecf529a02f41258fd39cbc1a1cee24525d (diff)
downloadydb-e826ebc0dee525ef263356dece4e470c3303cc7a.tar.gz
Restoring authorship annotation for <a-bocharov@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'util/generic/algorithm.h')
-rw-r--r--util/generic/algorithm.h18
1 files changed, 9 insertions, 9 deletions
diff --git a/util/generic/algorithm.h b/util/generic/algorithm.h
index 05a6c093ec..badfb88993 100644
--- a/util/generic/algorithm.h
+++ b/util/generic/algorithm.h
@@ -192,21 +192,21 @@ static inline auto FindIfPtr(C&& c, P pred) {
}
template <class C, class T>
-static inline size_t FindIndex(C&& c, const T& x) {
+static inline size_t FindIndex(C&& c, const T& x) {
using std::begin;
using std::end;
auto it = Find(begin(c), end(c), x);
return it == end(c) ? NPOS : (it - begin(c));
}
-template <class C, class P>
-static inline size_t FindIndexIf(C&& c, P p) {
- using std::begin;
- using std::end;
- auto it = FindIf(begin(c), end(c), p);
- return it == end(c) ? NPOS : (it - begin(c));
-}
-
+template <class C, class P>
+static inline size_t FindIndexIf(C&& c, P p) {
+ using std::begin;
+ using std::end;
+ auto it = FindIf(begin(c), end(c), p);
+ return it == end(c) ? NPOS : (it - begin(c));
+}
+
//EqualToOneOf(x, "apple", "orange") means (x == "apple" || x == "orange")
template <typename T>
inline bool EqualToOneOf(const T&) {