aboutsummaryrefslogtreecommitdiffstats
path: root/util/string
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
parentca90a6cd8db55c2a8716f5197e643d173949ee45 (diff)
downloadydb-d0d68c395c10da4cb56a1c845504570a04d7893e.tar.gz
Restoring authorship annotation for <dieash@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'util/string')
-rw-r--r--util/string/subst.cpp6
-rw-r--r--util/string/type_ut.cpp2
2 files changed, 4 insertions, 4 deletions
diff --git a/util/string/subst.cpp b/util/string/subst.cpp
index 09b6f2c7816..b2df328dc18 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) {
diff --git a/util/string/type_ut.cpp b/util/string/type_ut.cpp
index 2d395f84a98..03e7af62bd0 100644
--- a/util/string/type_ut.cpp
+++ b/util/string/type_ut.cpp
@@ -45,7 +45,7 @@ Y_UNIT_TEST_SUITE(TStringClassify) {
UNIT_ASSERT(!IsNumber("1234567890a"));
UNIT_ASSERT(!IsNumber("12345xx67890a"));
UNIT_ASSERT(!IsNumber("foobar"));
- UNIT_ASSERT(!IsNumber(""));
+ UNIT_ASSERT(!IsNumber(""));
UNIT_ASSERT(IsNumber(u"0"));
UNIT_ASSERT(IsNumber(u"12345678901234567890"));