aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/cgiparam
diff options
context:
space:
mode:
authordanlark <danlark@yandex-team.ru>2022-02-10 16:46:08 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:46:08 +0300
commit3426a9bc7f169ae9da54cef557ad2a33f6e8eee0 (patch)
tree26154e1e9990f1bb4525d3e3fb5b6dac2c2c1da2 /library/cpp/cgiparam
parentcb68f224c46a8ee52ac3fdd2a32534b8bb8dc134 (diff)
downloadydb-3426a9bc7f169ae9da54cef557ad2a33f6e8eee0.tar.gz
Restoring authorship annotation for <danlark@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'library/cpp/cgiparam')
-rw-r--r--library/cpp/cgiparam/cgiparam.cpp18
-rw-r--r--library/cpp/cgiparam/cgiparam.h2
2 files changed, 10 insertions, 10 deletions
diff --git a/library/cpp/cgiparam/cgiparam.cpp b/library/cpp/cgiparam/cgiparam.cpp
index f3277b8e4b..bd72f394bc 100644
--- a/library/cpp/cgiparam/cgiparam.cpp
+++ b/library/cpp/cgiparam/cgiparam.cpp
@@ -70,7 +70,7 @@ void TCgiParameters::JoinUnescaped(const TStringBuf key, char sep, TStringBuf va
for (++it; it != pair.second; erase(it++)) {
dst += sep;
- dst.AppendNoAlias(it->second.data(), it->second.size());
+ dst.AppendNoAlias(it->second.data(), it->second.size());
}
if (val.IsInited()) {
@@ -83,8 +83,8 @@ 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());
+ res.reserve(CgiUnescapeBufLen(s.size()));
+ res.ReserveAndResize(CgiUnescape(res.begin(), s).size());
return res;
}
@@ -144,7 +144,7 @@ TString TCgiParameters::Print() const {
res.reserve(PrintSize());
const char* end = Print(res.begin());
- res.ReserveAndResize(end - res.data());
+ res.ReserveAndResize(end - res.data());
return res;
}
@@ -173,7 +173,7 @@ size_t TCgiParameters::PrintSize() const noexcept {
size_t res = size(); // for '&'
for (const auto& i : *this) {
- res += CgiEscapeBufLen(i.first.size() + i.second.size()); // extra zero will be used for '='
+ res += CgiEscapeBufLen(i.first.size() + i.second.size()); // extra zero will be used for '='
}
return res;
@@ -200,7 +200,7 @@ TString TCgiParameters::QuotedPrint(const char* safe) const {
*ptr++ = '&';
}
- res.ReserveAndResize(ptr - res.data());
+ res.ReserveAndResize(ptr - res.data());
return res;
}
@@ -229,14 +229,14 @@ bool TCgiParameters::Has(const TStringBuf name, const TStringBuf value) const no
}
TQuickCgiParam::TQuickCgiParam(const TStringBuf cgiParamStr) {
- UnescapeBuf.reserve(CgiUnescapeBufLen(cgiParamStr.size()));
+ UnescapeBuf.reserve(CgiUnescapeBufLen(cgiParamStr.size()));
char* buf = UnescapeBuf.begin();
auto f = [this, &buf](const TStringBuf key, const TStringBuf val) {
TStringBuf name = CgiUnescapeBuf(buf, key);
- buf += name.size() + 1;
+ buf += name.size() + 1;
TStringBuf value = CgiUnescapeBuf(buf, val);
- buf += value.size() + 1;
+ buf += value.size() + 1;
Y_ASSERT(buf <= UnescapeBuf.begin() + UnescapeBuf.capacity() + 1 /*trailing zero*/);
emplace(name, value);
};
diff --git a/library/cpp/cgiparam/cgiparam.h b/library/cpp/cgiparam/cgiparam.h
index 87d1ab0ad4..25fa670c97 100644
--- a/library/cpp/cgiparam/cgiparam.h
+++ b/library/cpp/cgiparam/cgiparam.h
@@ -129,7 +129,7 @@ public:
return nullptr;
}
- return it->second.data();
+ return it->second.data();
}
};