diff options
author | dieash <dieash@yandex-team.ru> | 2022-02-10 16:47:26 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:47:26 +0300 |
commit | d0d68c395c10da4cb56a1c845504570a04d7893e (patch) | |
tree | 9814fbd1c3effac9b8377c5d604b367b14e2db55 /util | |
parent | ca90a6cd8db55c2a8716f5197e643d173949ee45 (diff) | |
download | ydb-d0d68c395c10da4cb56a1c845504570a04d7893e.tar.gz |
Restoring authorship annotation for <dieash@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'util')
-rw-r--r-- | util/string/subst.cpp | 6 | ||||
-rw-r--r-- | util/string/type_ut.cpp | 2 | ||||
-rw-r--r-- | util/system/unaligned_mem.h | 2 |
3 files changed, 5 insertions, 5 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) { diff --git a/util/string/type_ut.cpp b/util/string/type_ut.cpp index 2d395f84a9..03e7af62bd 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")); diff --git a/util/system/unaligned_mem.h b/util/system/unaligned_mem.h index 4835994640..4b84686f2f 100644 --- a/util/system/unaligned_mem.h +++ b/util/system/unaligned_mem.h @@ -4,7 +4,7 @@ #include "yassert.h" #include <string.h> -#include <type_traits> +#include <type_traits> // The following code used to have smart tricks assuming that unaligned reads and writes are OK on x86. This assumption // is wrong because compiler may emit alignment-sensitive x86 instructions e.g. movaps. See IGNIETFERRO-735. |