aboutsummaryrefslogtreecommitdiffstats
path: root/util/generic/algorithm.h
diff options
context:
space:
mode:
authordanlark <danlark@yandex-team.ru>2022-02-10 16:46:10 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:46:10 +0300
commitbaa58daefa91fde4b4769facdbd2903763b9c6a8 (patch)
tree1a2c5ffcf89eb53ecd79dbc9bc0a195c27404d0c /util/generic/algorithm.h
parent3426a9bc7f169ae9da54cef557ad2a33f6e8eee0 (diff)
downloadydb-baa58daefa91fde4b4769facdbd2903763b9c6a8.tar.gz
Restoring authorship annotation for <danlark@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'util/generic/algorithm.h')
-rw-r--r--util/generic/algorithm.h22
1 files changed, 11 insertions, 11 deletions
diff --git a/util/generic/algorithm.h b/util/generic/algorithm.h
index 0b24a74a92..badfb88993 100644
--- a/util/generic/algorithm.h
+++ b/util/generic/algorithm.h
@@ -347,17 +347,17 @@ void EraseIf(C& c, P p) {
c.erase(std::remove_if(c.begin(), c.end(), p), c.end());
}
-template <class C, class P>
-void EraseNodesIf(C& c, P p) {
- for (auto iter = c.begin(), last = c.end(); iter != last;) {
- if (p(*iter)) {
- c.erase(iter++);
- } else {
- ++iter;
- }
- }
-}
-
+template <class C, class P>
+void EraseNodesIf(C& c, P p) {
+ for (auto iter = c.begin(), last = c.end(); iter != last;) {
+ if (p(*iter)) {
+ c.erase(iter++);
+ } else {
+ ++iter;
+ }
+ }
+}
+
template <class T1, class T2>
static inline bool Equal(T1 f1, T1 l1, T2 f2) {
return std::equal(f1, l1, f2);