aboutsummaryrefslogtreecommitdiffstats
path: root/util/string/subst.cpp
diff options
context:
space:
mode:
authordieash <dieash@yandex-team.ru>2022-02-10 16:47:26 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:47:26 +0300
commitca90a6cd8db55c2a8716f5197e643d173949ee45 (patch)
tree153fb1b87443aca614948fda2f9e7f652ef7c141 /util/string/subst.cpp
parentb71cb79039a5ce17476c821883ef2e62eb4179d2 (diff)
downloadydb-ca90a6cd8db55c2a8716f5197e643d173949ee45.tar.gz
Restoring authorship annotation for <dieash@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'util/string/subst.cpp')
-rw-r--r--util/string/subst.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/util/string/subst.cpp b/util/string/subst.cpp
index b2df328dc1..09b6f2c781 100644
--- a/util/string/subst.cpp
+++ b/util/string/subst.cpp
@@ -81,7 +81,7 @@ static inline size_t SubstGlobalImpl(TStringType& s, const TStringViewType from,
// string will not grow: use inplace algo
size_t dstPos = 0;
- typename TStringType::value_type* ptr = &*s.begin();
+ typename TStringType::value_type* ptr = &*s.begin();
for (; (off = TStringViewType(s).find(from, off)) != TStringType::npos; off += fromSize) {
Y_ASSERT(dstPos <= srcPos);
MoveBlock<TStringType, TStringViewType, true>(ptr, srcPos, dstPos, off, to, toSize);
@@ -109,11 +109,11 @@ inline size_t SubstCharGlobalImpl(TStringType& s, typename TStringType::value_ty
// s.begin() might cause memory copying, so call it only if needed
if (fromPos != TStringType::npos) {
- auto* it = &*s.begin() + fromPos;
+ auto* it = &*s.begin() + fromPos;
*it = to;
++result;
// at this point string is copied and it's safe to use constant s.end() to iterate
- const auto* const sEnd = &*s.end();
+ const auto* const sEnd = &*s.end();
// unrolled loop goes first because it is more likely that `it` will be properly aligned
for (const auto* const end = sEnd - (sEnd - it) % 4; it < end;) {
if (*it == from) {