aboutsummaryrefslogtreecommitdiffstats
path: root/util
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
parentb71cb79039a5ce17476c821883ef2e62eb4179d2 (diff)
downloadydb-ca90a6cd8db55c2a8716f5197e643d173949ee45.tar.gz
Restoring authorship annotation for <dieash@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'util')
-rw-r--r--util/string/subst.cpp6
-rw-r--r--util/string/type_ut.cpp2
-rw-r--r--util/system/unaligned_mem.h2
3 files changed, 5 insertions, 5 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) {
diff --git a/util/string/type_ut.cpp b/util/string/type_ut.cpp
index 03e7af62bd..2d395f84a9 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 4b84686f2f..4835994640 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.