diff options
author | maslov <maslov@yandex-team.ru> | 2022-02-10 16:48:18 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:48:18 +0300 |
commit | 7429d8be0f619d00069466e159d8ecd43a60f61a (patch) | |
tree | ee12c5d6eea3a9caf55ff0a8dca140340ec15605 | |
parent | 6238988d0cc5068b8e6f61abe8dac4c6817720ad (diff) | |
download | ydb-7429d8be0f619d00069466e159d8ecd43a60f61a.tar.gz |
Restoring authorship annotation for <maslov@yandex-team.ru>. Commit 1 of 2.
-rw-r--r-- | contrib/tools/ya.make | 2 | ||||
-rw-r--r-- | library/cpp/cgiparam/cgiparam.cpp | 24 | ||||
-rw-r--r-- | library/cpp/cgiparam/cgiparam.h | 10 | ||||
-rw-r--r-- | library/cpp/containers/atomizer/atomizer.h | 2 | ||||
-rw-r--r-- | library/cpp/string_utils/quote/quote.cpp | 12 | ||||
-rw-r--r-- | util/system/compat.h | 4 |
6 files changed, 27 insertions, 27 deletions
diff --git a/contrib/tools/ya.make b/contrib/tools/ya.make index 750911c587..2c78c883da 100644 --- a/contrib/tools/ya.make +++ b/contrib/tools/ya.make @@ -40,7 +40,7 @@ RECURSE( tf tpce-benchmark tpch-benchmark - tre + tre unbound unbound/build vowpal_wabbit diff --git a/library/cpp/cgiparam/cgiparam.cpp b/library/cpp/cgiparam/cgiparam.cpp index f3277b8e4b..948f1060c3 100644 --- a/library/cpp/cgiparam/cgiparam.cpp +++ b/library/cpp/cgiparam/cgiparam.cpp @@ -28,8 +28,8 @@ bool TCgiParameters::Erase(const TStringBuf name, size_t pos) { } return false; -} - +} + bool TCgiParameters::Erase(const TStringBuf name, const TStringBuf val) { const auto pair = equal_range(name); @@ -82,17 +82,17 @@ void TCgiParameters::JoinUnescaped(const TStringBuf key, char sep, TStringBuf va static inline TString DoUnescape(const TStringBuf s) { TString res; - + res.reserve(CgiUnescapeBufLen(s.size())); res.ReserveAndResize(CgiUnescape(res.begin(), s).size()); return res; } - + void TCgiParameters::InsertEscaped(const TStringBuf name, const TStringBuf value) { InsertUnescaped(DoUnescape(name), DoUnescape(value)); } - + template <bool addAll, class F> static inline void DoScan(const TStringBuf s, F& f) { ScanKeyValue<addAll, '&', '='>(s, f); @@ -115,8 +115,8 @@ void TCgiParameters::ScanAdd(const TStringBuf query) { TAddEscaped f = {this}; DoScan<false>(query, f); -} - +} + void TCgiParameters::ScanAddUnescaped(const TStringBuf query) { auto f = [this](const TStringBuf key, const TStringBuf val) { this->InsertUnescaped(key, val); @@ -147,8 +147,8 @@ TString TCgiParameters::Print() const { res.ReserveAndResize(end - res.data()); return res; -} - +} + char* TCgiParameters::Print(char* res) const { if (empty()) { return res; @@ -214,8 +214,8 @@ TCgiParameters::const_iterator TCgiParameters::Find(const TStringBuf name, size_ } return end(); -} - +} + bool TCgiParameters::Has(const TStringBuf name, const TStringBuf value) const noexcept { const auto pair = equal_range(name); @@ -226,7 +226,7 @@ bool TCgiParameters::Has(const TStringBuf name, const TStringBuf value) const no } return false; -} +} TQuickCgiParam::TQuickCgiParam(const TStringBuf cgiParamStr) { UnescapeBuf.reserve(CgiUnescapeBufLen(cgiParamStr.size())); diff --git a/library/cpp/cgiparam/cgiparam.h b/library/cpp/cgiparam/cgiparam.h index 87d1ab0ad4..2abb4989a6 100644 --- a/library/cpp/cgiparam/cgiparam.h +++ b/library/cpp/cgiparam/cgiparam.h @@ -1,5 +1,5 @@ #pragma once - + #include <library/cpp/iterator/iterate_values.h> #include <util/generic/iterator_range.h> @@ -19,17 +19,17 @@ struct TStringLess { class TCgiParameters: public TMultiMap<TString, TString> { public: TCgiParameters() = default; - + explicit TCgiParameters(const TStringBuf cgiParamStr) { Scan(cgiParamStr); } - + TCgiParameters(std::initializer_list<std::pair<TString, TString>> il); void Flush() { erase(begin(), end()); } - + size_t EraseAll(const TStringBuf name); size_t NumOfValues(const TStringBuf name) const noexcept { @@ -131,7 +131,7 @@ public: return it->second.data(); } -}; +}; template <typename TIter> void TCgiParameters::ReplaceUnescaped(const TStringBuf key, TIter valuesBegin, const TIter valuesEnd) { diff --git a/library/cpp/containers/atomizer/atomizer.h b/library/cpp/containers/atomizer/atomizer.h index 5e40f47ab9..5fa2764b3a 100644 --- a/library/cpp/containers/atomizer/atomizer.h +++ b/library/cpp/containers/atomizer/atomizer.h @@ -64,7 +64,7 @@ public: return (ui32)(*ins.first).second; // == size()+1 } ui32 find_atom(const char* key) const { - const_iterator it = find(key); + const_iterator it = find(key); if (it == end()) return 0; // INVALID_ATOM else diff --git a/library/cpp/string_utils/quote/quote.cpp b/library/cpp/string_utils/quote/quote.cpp index e523350b80..2f1a26a0ee 100644 --- a/library/cpp/string_utils/quote/quote.cpp +++ b/library/cpp/string_utils/quote/quote.cpp @@ -3,7 +3,7 @@ #include <util/memory/tempbuf.h> #include <util/string/ascii.h> #include <util/string/cstriter.h> - + #include <cctype> /* note: (x & 0xdf) makes x upper case */ @@ -34,7 +34,7 @@ namespace { GETXC; return c; } - + static inline char x2c(TStringBuf& x) { if (!IsAsciiHex((ui8)x[0]) || !IsAsciiHex((ui8)x[1])) return '%'; @@ -66,8 +66,8 @@ namespace { static inline char d2x(unsigned x) { return (char)((x < 10) ? ('0' + x) : ('A' + x - 10)); -} - +} + static inline const char* FixZero(const char* s) noexcept { return s ? s : ""; } @@ -120,7 +120,7 @@ static inline It1 Escape(It1 to, It2 from, It3 end, const bool* escape_map = cha *to = 0; return to; -} +} template <class It1, class It2, class It3, class FromHex> static inline It1 Unescape(It1 to, It2 from, It3 end, FromHex fromHex) { @@ -161,7 +161,7 @@ void CGIEscape(TString& url) { url.AssignNoAlias(to, CGIEscape(to, url.data(), url.size())); } - + TString CGIEscapeRet(const TStringBuf url) { TString to; to.ReserveAndResize(CgiEscapeBufLen(url.size())); diff --git a/util/system/compat.h b/util/system/compat.h index c53dbcca17..ec52bd1264 100644 --- a/util/system/compat.h +++ b/util/system/compat.h @@ -46,9 +46,9 @@ extern "C" { void verrx(int status, const char* format, va_list ap); #else #include <err.h> -#endif +#endif } - + #ifdef _MSC_VER #define popen _popen #define pclose _pclose |