aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorulgen4a <ulgen4a@yandex-team.ru>2022-02-10 16:48:08 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:48:08 +0300
commitc4de7efdedc25b49cbea74bd589eecb61b55b60a (patch)
treeb222e5ac2e2e98872661c51ccceee5da0d291e13
parent9ef1bf9e69d369800773d810755391694086d4a4 (diff)
downloadydb-c4de7efdedc25b49cbea74bd589eecb61b55b60a.tar.gz
Restoring authorship annotation for <ulgen4a@yandex-team.ru>. Commit 2 of 2.
-rw-r--r--contrib/libs/pire/pire/stub/stl.h36
-rw-r--r--util/generic/algorithm.h6
-rw-r--r--ydb/library/yql/public/udf/udf_string_ref.h64
3 files changed, 53 insertions, 53 deletions
diff --git a/contrib/libs/pire/pire/stub/stl.h b/contrib/libs/pire/pire/stub/stl.h
index 204d5a86d0..98ebd9f7c6 100644
--- a/contrib/libs/pire/pire/stub/stl.h
+++ b/contrib/libs/pire/pire/stub/stl.h
@@ -25,41 +25,41 @@
#include <util/string/reverse.h>
#include <util/string/vector.h>
-namespace Pire {
+namespace Pire {
using ystring = TString;
template<size_t N> using ybitset = std::bitset<N>;
template<typename T1, typename T2> using ypair = std::pair<T1, T2>;
template<typename T> using yauto_ptr = std::auto_ptr<T>;
template<typename Arg1, typename Arg2, typename Result> using ybinary_function = std::binary_function<Arg1, Arg2, Result>;
- template<typename T1, typename T2>
- inline ypair<T1, T2> ymake_pair(T1 v1, T2 v2) {
+ template<typename T1, typename T2>
+ inline ypair<T1, T2> ymake_pair(T1 v1, T2 v2) {
return std::make_pair(v1, v2);
- }
+ }
- template<typename T>
- inline T ymax(T v1, T v2) {
+ template<typename T>
+ inline T ymax(T v1, T v2) {
return std::max(v1, v2);
- }
+ }
- template<typename T>
- inline T ymin(T v1, T v2) {
+ template<typename T>
+ inline T ymin(T v1, T v2) {
return std::min(v1, v2);
- }
+ }
- template<class Iter, class T>
+ template<class Iter, class T>
void Fill(Iter begin, Iter end, T t) { std::fill(begin, end, t); }
- class Error: public yexception {
- public:
- Error(const char* msg) { *this << msg; }
- Error(const ystring& msg) { *this << msg; }
- };
+ class Error: public yexception {
+ public:
+ Error(const char* msg) { *this << msg; }
+ Error(const ystring& msg) { *this << msg; }
+ };
typedef IOutputStream yostream;
typedef IInputStream yistream;
-
- template<class Iter>
+
+ template<class Iter>
ystring Join(Iter begin, Iter end, const ystring& separator) { return JoinStrings(begin, end, separator); }
}
diff --git a/util/generic/algorithm.h b/util/generic/algorithm.h
index b3d0dc98bc..badfb88993 100644
--- a/util/generic/algorithm.h
+++ b/util/generic/algorithm.h
@@ -629,10 +629,10 @@ static inline void Transform(T1 b, T1 e, T2 o, O f) {
}
template <class T1, class T2, class T3, class O>
-static inline void Transform(T1 b1, T1 e1, T2 b2, T3 o, O f) {
+static inline void Transform(T1 b1, T1 e1, T2 b2, T3 o, O f) {
std::transform(b1, e1, b2, o, f);
-}
-
+}
+
template <class T, class V>
inline typename std::iterator_traits<T>::difference_type Count(T first, T last, const V& value) {
return std::count(first, last, value);
diff --git a/ydb/library/yql/public/udf/udf_string_ref.h b/ydb/library/yql/public/udf/udf_string_ref.h
index 80dc91b4a4..75a82b81e6 100644
--- a/ydb/library/yql/public/udf/udf_string_ref.h
+++ b/ydb/library/yql/public/udf/udf_string_ref.h
@@ -81,7 +81,7 @@ public:
template <typename TStringType>
inline constexpr TStringRef(const TStringType& buf) noexcept
- : TBase(TGetData<TStringType>::Get(buf), TGetSize<TStringType>::Get(buf))
+ : TBase(TGetData<TStringType>::Get(buf), TGetSize<TStringType>::Get(buf))
{}
template <size_t size>
@@ -133,42 +133,42 @@ private:
return result;
return int(s1.Size()) - int(s2.Size());
}
-
- Y_HAS_MEMBER(Data);
- Y_HAS_MEMBER(Size);
-
- template<typename TStringType>
- struct TByData {
+
+ Y_HAS_MEMBER(Data);
+ Y_HAS_MEMBER(Size);
+
+ template<typename TStringType>
+ struct TByData {
static constexpr auto Get(const TStringType& buf) noexcept {
- return buf.Data();
- }
- };
-
- template<typename TStringType>
- struct TBySize {
+ return buf.Data();
+ }
+ };
+
+ template<typename TStringType>
+ struct TBySize {
static constexpr auto Get(const TStringType& buf) noexcept {
- return buf.Size();
- }
- };
-
- template<typename TStringType>
- struct TBydata {
+ return buf.Size();
+ }
+ };
+
+ template<typename TStringType>
+ struct TBydata {
static constexpr auto Get(const TStringType& buf) noexcept {
- return buf.data();
- }
- };
-
- template<typename TStringType>
- struct TBysize {
+ return buf.data();
+ }
+ };
+
+ template<typename TStringType>
+ struct TBysize {
static constexpr auto Get(const TStringType& buf) noexcept {
- return buf.size();
- }
- };
-
- template<typename TStringType>
+ return buf.size();
+ }
+ };
+
+ template<typename TStringType>
using TGetData = std::conditional_t<THasData<TStringType>::value, TByData<TStringType>, TBydata<TStringType>>;
-
- template<typename TStringType>
+
+ template<typename TStringType>
using TGetSize = std::conditional_t<THasSize<TStringType>::value, TBySize<TStringType>, TBysize<TStringType>>;
};