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
commitd0d68c395c10da4cb56a1c845504570a04d7893e (patch)
tree9814fbd1c3effac9b8377c5d604b367b14e2db55 /util/string/subst.cpp
parentca90a6cd8db55c2a8716f5197e643d173949ee45 (diff)
downloadydb-d0d68c395c10da4cb56a1c845504570a04d7893e.tar.gz
Restoring authorship annotation for <dieash@yandex-team.ru>. Commit 2 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 09b6f2c781..b2df328dc1 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) {