diff options
author | ekrokhalev <ekrokhalev@yandex-team.ru> | 2022-02-10 16:50:10 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:50:10 +0300 |
commit | 8d3a5b9c70bfb823a30242286328d6017b82b9ce (patch) | |
tree | 5d5cb817648f650d76cf1076100726fd9b8448e8 /library | |
parent | 1c01ed5294724fda060c1f0bd674b315fe249598 (diff) | |
download | ydb-8d3a5b9c70bfb823a30242286328d6017b82b9ce.tar.gz |
Restoring authorship annotation for <ekrokhalev@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'library')
-rw-r--r-- | library/cpp/accurate_accumulate/accurate_accumulate.h | 30 | ||||
-rw-r--r-- | library/cpp/cgiparam/cgiparam_ut.cpp | 20 | ||||
-rw-r--r-- | library/cpp/deprecated/split/delim_string_iter.h | 10 | ||||
-rw-r--r-- | library/cpp/getopt/small/opt2.cpp | 12 | ||||
-rw-r--r-- | library/cpp/getopt/small/opt2.h | 4 |
5 files changed, 38 insertions, 38 deletions
diff --git a/library/cpp/accurate_accumulate/accurate_accumulate.h b/library/cpp/accurate_accumulate/accurate_accumulate.h index b90ea2f4d2..dacced17e9 100644 --- a/library/cpp/accurate_accumulate/accurate_accumulate.h +++ b/library/cpp/accurate_accumulate/accurate_accumulate.h @@ -42,24 +42,24 @@ public: template <typename TFloatType> inline bool operator<(const TKahanAccumulator<TFloatType>& other) const { return Get() < other.Get(); - } - - template <typename TFloatType> + } + + template <typename TFloatType> inline bool operator<=(const TKahanAccumulator<TFloatType>& other) const { - return !(other < *this); - } - - template <typename TFloatType> + return !(other < *this); + } + + template <typename TFloatType> inline bool operator>(const TKahanAccumulator<TFloatType>& other) const { - return other < *this; - } - - template <typename TFloatType> + return other < *this; + } + + template <typename TFloatType> inline bool operator>=(const TKahanAccumulator<TFloatType>& other) const { - return !(*this < other); - } - - template <typename TFloatType> + return !(*this < other); + } + + template <typename TFloatType> inline TKahanAccumulator& operator+=(const TFloatType x) { const TValueType y = TValueType(x) - Compensation_; const TValueType t = Sum_ + y; diff --git a/library/cpp/cgiparam/cgiparam_ut.cpp b/library/cpp/cgiparam/cgiparam_ut.cpp index 01edd0324c..a562342084 100644 --- a/library/cpp/cgiparam/cgiparam_ut.cpp +++ b/library/cpp/cgiparam/cgiparam_ut.cpp @@ -205,16 +205,16 @@ Y_UNIT_TEST_SUITE(TCgiParametersTest) { Y_UNIT_TEST(TestContInit) { TCgiParameters c = {std::make_pair("a", "a1"), std::make_pair("b", "b1"), std::make_pair("a", "a2")}; - - UNIT_ASSERT_VALUES_EQUAL(c.NumOfValues("a"), 2u); - UNIT_ASSERT_VALUES_EQUAL(c.NumOfValues("b"), 1u); - - UNIT_ASSERT_VALUES_EQUAL(c.Get("b"), "b1"); - UNIT_ASSERT_VALUES_EQUAL(c.Get("a", 0), "a1"); - UNIT_ASSERT_VALUES_EQUAL(c.Get("a", 1), "a2"); - - UNIT_ASSERT_VALUES_EQUAL(c.Print(), "a=a1&a=a2&b=b1"); - } + + UNIT_ASSERT_VALUES_EQUAL(c.NumOfValues("a"), 2u); + UNIT_ASSERT_VALUES_EQUAL(c.NumOfValues("b"), 1u); + + UNIT_ASSERT_VALUES_EQUAL(c.Get("b"), "b1"); + UNIT_ASSERT_VALUES_EQUAL(c.Get("a", 0), "a1"); + UNIT_ASSERT_VALUES_EQUAL(c.Get("a", 1), "a2"); + + UNIT_ASSERT_VALUES_EQUAL(c.Print(), "a=a1&a=a2&b=b1"); + } Y_UNIT_TEST(TestPrintAsQuote) { TCgiParameters c = { diff --git a/library/cpp/deprecated/split/delim_string_iter.h b/library/cpp/deprecated/split/delim_string_iter.h index 8bf66ce943..8e4ca171a0 100644 --- a/library/cpp/deprecated/split/delim_string_iter.h +++ b/library/cpp/deprecated/split/delim_string_iter.h @@ -22,13 +22,13 @@ public: } inline TDelimStringIter(TStringBuf str, TStringBuf delim) - : IsValid(true) + : IsValid(true) , Str(str) - , Delim(delim) - { + , Delim(delim) + { UpdateCurrent(); - } - + } + inline TDelimStringIter() : IsValid(false) { diff --git a/library/cpp/getopt/small/opt2.cpp b/library/cpp/getopt/small/opt2.cpp index 1ce2741c86..0cdc774e78 100644 --- a/library/cpp/getopt/small/opt2.cpp +++ b/library/cpp/getopt/small/opt2.cpp @@ -248,13 +248,13 @@ unsigned long Opt2::UInt(char opt, const char* help, unsigned long def, bool req return rv; } -// Add user defined error message and set error flag -void Opt2::AddError(const char* message) { - HasErrors = true; +// Add user defined error message and set error flag +void Opt2::AddError(const char* message) { + HasErrors = true; if (message) - UserErrorMessages.push_back(message); -} - + UserErrorMessages.push_back(message); +} + int Opt2::AutoUsage(const char* free_arg_names) { if (!HasErrors) return 0; diff --git a/library/cpp/getopt/small/opt2.h b/library/cpp/getopt/small/opt2.h index 84198c1aba..4d9d943237 100644 --- a/library/cpp/getopt/small/opt2.h +++ b/library/cpp/getopt/small/opt2.h @@ -107,9 +107,9 @@ public: // For options w/o parameters bool Has(char opt, const char* helpUsage); - // Add user defined error message and set error flag + // Add user defined error message and set error flag void AddError(const char* message = nullptr); - + public: // non-option args TVector<char*> Pos; |