aboutsummaryrefslogtreecommitdiffstats
path: root/util/generic/algorithm.h
diff options
context:
space:
mode:
authorhr0nix <hr0nix@yandex-team.ru>2022-02-10 16:49:59 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:49:59 +0300
commitbee0f5f332db3abff5839ff24ac18000c161a30a (patch)
tree5d5cb817648f650d76cf1076100726fd9b8448e8 /util/generic/algorithm.h
parentba105fe2a44ef4553a9c1dabc9c632702a59c965 (diff)
downloadydb-bee0f5f332db3abff5839ff24ac18000c161a30a.tar.gz
Restoring authorship annotation for <hr0nix@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'util/generic/algorithm.h')
-rw-r--r--util/generic/algorithm.h36
1 files changed, 18 insertions, 18 deletions
diff --git a/util/generic/algorithm.h b/util/generic/algorithm.h
index ade741b32c..badfb88993 100644
--- a/util/generic/algorithm.h
+++ b/util/generic/algorithm.h
@@ -437,7 +437,7 @@ template <class I, class T>
static inline void Fill(I f, I l, const T& v) {
std::fill(f, l, v);
}
-
+
template <typename I, typename S, typename T>
static inline I FillN(I f, S n, const T& v) {
return std::fill_n(f, n, v);
@@ -446,12 +446,12 @@ static inline I FillN(I f, S n, const T& v) {
template <class T>
static inline void Reverse(T f, T l) {
std::reverse(f, l);
-}
-
+}
+
template <class T>
static inline void Rotate(T f, T m, T l) {
std::rotate(f, m, l);
-}
+}
template <typename It, typename Val>
Val Accumulate(It begin, It end, Val val) {
@@ -464,7 +464,7 @@ Val Accumulate(It begin, It end, Val val, BinOp binOp) {
// std::move since C++20
return std::accumulate(begin, end, std::move(val), binOp);
}
-
+
template <typename C, typename Val>
Val Accumulate(const C& c, Val val) {
// std::move since C++20
@@ -498,25 +498,25 @@ static inline typename TVectorType::value_type InnerProduct(const TVectorType& l
}
template <class T>
-static inline T MinElement(T begin, T end) {
+static inline T MinElement(T begin, T end) {
return std::min_element(begin, end);
-}
-
+}
+
template <class T, class C>
-static inline T MinElement(T begin, T end, C comp) {
+static inline T MinElement(T begin, T end, C comp) {
return std::min_element(begin, end, comp);
-}
-
+}
+
template <class T>
-static inline T MaxElement(T begin, T end) {
+static inline T MaxElement(T begin, T end) {
return std::max_element(begin, end);
-}
-
+}
+
template <class T, class C>
-static inline T MaxElement(T begin, T end, C comp) {
+static inline T MaxElement(T begin, T end, C comp) {
return std::max_element(begin, end, comp);
-}
-
+}
+
template <class I, class F>
I MaxElementBy(I begin, I end, F&& func) {
using TValue = decltype(func(*begin));
@@ -558,7 +558,7 @@ void ApplyToMany(TOp op, TArgs&&... args) {
template <class TI, class TOp>
inline void ForEach(TI f, TI l, TOp op) {
std::for_each(f, l, op);
-}
+}
namespace NPrivate {
template <class T, class TOp, size_t... Is>