diff options
author | grand <grand@yandex-team.ru> | 2022-02-10 16:50:07 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:50:07 +0300 |
commit | a0e29f0026d32a60a618a620f30035c264346175 (patch) | |
tree | 5d5cb817648f650d76cf1076100726fd9b8448e8 /library/cpp/cgiparam | |
parent | 7eb3862cccdb866e7e739123c8024ccec628bb62 (diff) | |
download | ydb-a0e29f0026d32a60a618a620f30035c264346175.tar.gz |
Restoring authorship annotation for <grand@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'library/cpp/cgiparam')
-rw-r--r-- | library/cpp/cgiparam/cgiparam.cpp | 10 | ||||
-rw-r--r-- | library/cpp/cgiparam/cgiparam.h | 4 | ||||
-rw-r--r-- | library/cpp/cgiparam/cgiparam_ut.cpp | 2 |
3 files changed, 8 insertions, 8 deletions
diff --git a/library/cpp/cgiparam/cgiparam.cpp b/library/cpp/cgiparam/cgiparam.cpp index 995ccfcf49..f3277b8e4b 100644 --- a/library/cpp/cgiparam/cgiparam.cpp +++ b/library/cpp/cgiparam/cgiparam.cpp @@ -6,11 +6,11 @@ #include <util/generic/singleton.h> TCgiParameters::TCgiParameters(std::initializer_list<std::pair<TString, TString>> il) { - for (const auto& item : il) { - insert(item); - } -} - + for (const auto& item : il) { + insert(item); + } +} + const TString& TCgiParameters::Get(const TStringBuf name, size_t numOfValue) const noexcept { const auto it = Find(name, numOfValue); diff --git a/library/cpp/cgiparam/cgiparam.h b/library/cpp/cgiparam/cgiparam.h index afb7ed3bb7..87d1ab0ad4 100644 --- a/library/cpp/cgiparam/cgiparam.h +++ b/library/cpp/cgiparam/cgiparam.h @@ -7,7 +7,7 @@ #include <util/generic/strbuf.h> #include <util/generic/string.h> -#include <initializer_list> +#include <initializer_list> struct TStringLess { template <class T1, class T2> @@ -25,7 +25,7 @@ public: } TCgiParameters(std::initializer_list<std::pair<TString, TString>> il); - + void Flush() { erase(begin(), end()); } diff --git a/library/cpp/cgiparam/cgiparam_ut.cpp b/library/cpp/cgiparam/cgiparam_ut.cpp index 359e387776..a562342084 100644 --- a/library/cpp/cgiparam/cgiparam_ut.cpp +++ b/library/cpp/cgiparam/cgiparam_ut.cpp @@ -204,7 +204,7 @@ 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")}; + 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); |