aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/scheme
diff options
context:
space:
mode:
authoreeight <eeight@yandex-team.ru>2022-02-10 16:46:18 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:46:18 +0300
commit475c0a46f28166e83fd263badc7546377cddcabe (patch)
tree39c5a49b8aaad78fe390b6f1f2886bdbda40f3e7 /library/cpp/scheme
parenta6e0145a095c7bb3770d6e07aee301de5c73f96e (diff)
downloadydb-475c0a46f28166e83fd263badc7546377cddcabe.tar.gz
Restoring authorship annotation for <eeight@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'library/cpp/scheme')
-rw-r--r--library/cpp/scheme/domscheme_traits.h2
-rw-r--r--library/cpp/scheme/scheme.cpp10
-rw-r--r--library/cpp/scheme/scimpl.h2
-rw-r--r--library/cpp/scheme/tests/fuzz_ops/lib/vm_defs.cpp16
-rw-r--r--library/cpp/scheme/tests/fuzz_ops/lib/vm_defs.h18
-rw-r--r--library/cpp/scheme/tests/fuzz_ops/ut/vm_parse_ut.cpp20
-rw-r--r--library/cpp/scheme/ut_utils/scheme_ut_utils.h2
7 files changed, 35 insertions, 35 deletions
diff --git a/library/cpp/scheme/domscheme_traits.h b/library/cpp/scheme/domscheme_traits.h
index a11c4dd444..18e1798fd9 100644
--- a/library/cpp/scheme/domscheme_traits.h
+++ b/library/cpp/scheme/domscheme_traits.h
@@ -1,7 +1,7 @@
#pragma once
#include "scheme.h"
-#include <util/string/cast.h>
+#include <util/string/cast.h>
struct TSchemeTraits {
using TValue = NSc::TValue;
diff --git a/library/cpp/scheme/scheme.cpp b/library/cpp/scheme/scheme.cpp
index 3efd116d4f..3eb2e6c46e 100644
--- a/library/cpp/scheme/scheme.cpp
+++ b/library/cpp/scheme/scheme.cpp
@@ -2,7 +2,7 @@
#include "scimpl_private.h"
#include <util/generic/algorithm.h>
-#include <util/string/cast.h>
+#include <util/string/cast.h>
namespace NSc {
TStringBufs& TValue::DictKeys(TStringBufs& vs, bool sorted) const {
@@ -251,10 +251,10 @@ namespace NSc {
}
if (coreA.IsString()) {
- std::string_view strA = coreA.String;
- std::string_view strB = coreB.String;
+ std::string_view strA = coreA.String;
+ std::string_view strB = coreB.String;
- if (strA != strB) {
+ if (strA != strB) {
return false;
}
} else if (coreA.IsArray()) {
@@ -507,7 +507,7 @@ namespace NSc {
namespace NPrivate {
int CompareStr(const NSc::TValue& a, TStringBuf b) {
- return a.GetString().compare(b);
+ return a.GetString().compare(b);
}
int CompareInt(const NSc::TValue& a, i64 r) {
diff --git a/library/cpp/scheme/scimpl.h b/library/cpp/scheme/scimpl.h
index 4f68f16290..5ab13a1955 100644
--- a/library/cpp/scheme/scimpl.h
+++ b/library/cpp/scheme/scimpl.h
@@ -552,7 +552,7 @@ namespace NSc {
}
bool TValue::Has(TStringBuf s) const {
- return GetDict().contains(s);
+ return GetDict().contains(s);
}
TValue& TValue::GetOrAddUnsafe(size_t idx) {
diff --git a/library/cpp/scheme/tests/fuzz_ops/lib/vm_defs.cpp b/library/cpp/scheme/tests/fuzz_ops/lib/vm_defs.cpp
index 55a971d9e4..2a06e29f22 100644
--- a/library/cpp/scheme/tests/fuzz_ops/lib/vm_defs.cpp
+++ b/library/cpp/scheme/tests/fuzz_ops/lib/vm_defs.cpp
@@ -102,23 +102,23 @@ namespace NSc::NUt {
TRef TVMAction::GetRef(ui32 arg) const noexcept {
- return std::get<TRef>(Arg[arg]);
+ return std::get<TRef>(Arg[arg]);
}
TSrc TVMAction::GetSrc(ui32 arg) const noexcept {
- return std::get<TSrc>(Arg[arg]);
+ return std::get<TSrc>(Arg[arg]);
}
TDst TVMAction::GetDst(ui32 arg) const noexcept {
- return std::get<TDst>(Arg[arg]);
+ return std::get<TDst>(Arg[arg]);
}
ui32 TVMAction::GetPos(ui32 arg) const noexcept {
- return std::get<TPos>(Arg[arg]).Pos;
+ return std::get<TPos>(Arg[arg]).Pos;
}
ui32 TVMAction::GetIdx(ui32 arg) const noexcept {
- return std::get<TIdx>(Arg[arg]).Idx;
+ return std::get<TIdx>(Arg[arg]).Idx;
}
TStringBuf TVMAction::GetKey(ui32 arg) const noexcept {
@@ -134,7 +134,7 @@ namespace NSc::NUt {
}
TStringBuf TVMAction::GetPath(ui32 arg) const noexcept {
- return std::get<TPath>(Arg[arg]).Path;
+ return std::get<TPath>(Arg[arg]).Path;
}
@@ -143,7 +143,7 @@ namespace NSc::NUt {
: Out(out)
{}
- bool operator()(const std::monostate&) const {
+ bool operator()(const std::monostate&) const {
return true;
}
//TIdx, TPos, TRef, TSrc, TDst, TPath
@@ -159,7 +159,7 @@ namespace NSc::NUt {
TStringBuilder out;
out << Type;
for (const auto& arg : Arg) {
- if (std::visit(TActionPrinter(out.Out), arg)) {
+ if (std::visit(TActionPrinter(out.Out), arg)) {
break;
}
}
diff --git a/library/cpp/scheme/tests/fuzz_ops/lib/vm_defs.h b/library/cpp/scheme/tests/fuzz_ops/lib/vm_defs.h
index 9a0ddf7351..7db4ddeda3 100644
--- a/library/cpp/scheme/tests/fuzz_ops/lib/vm_defs.h
+++ b/library/cpp/scheme/tests/fuzz_ops/lib/vm_defs.h
@@ -98,11 +98,11 @@ namespace NSc::NUt {
return std::move(Memory[pos]);
}
- [[nodiscard]]
+ [[nodiscard]]
bool TryPushBack();
template <class T>
- [[nodiscard]]
+ [[nodiscard]]
bool TryPushBack(T&& t) {
if (MayAddMoreMemory()) {
Memory.emplace_back(std::forward<T>(t));
@@ -112,11 +112,11 @@ namespace NSc::NUt {
}
}
- [[nodiscard]]
+ [[nodiscard]]
bool TryPushFront();
template <class T>
- [[nodiscard]]
+ [[nodiscard]]
bool TryPushFront(T&& t) {
if (MayAddMoreMemory()) {
Pos += 1;
@@ -127,16 +127,16 @@ namespace NSc::NUt {
}
}
- [[nodiscard]]
+ [[nodiscard]]
bool TryPopBack();
- [[nodiscard]]
+ [[nodiscard]]
bool TryPopFront();
TString ToString() const;
private:
- [[nodiscard]]
+ [[nodiscard]]
bool MayAddMoreMemory() const noexcept {
return Memory.size() < MaxMemory;
}
@@ -223,7 +223,7 @@ namespace NSc::NUt {
TString ToString() const;
};
- using TArg = std::variant<std::monostate, TIdx, TPos, TRef, TSrc, TDst, TPath>;
+ using TArg = std::variant<std::monostate, TIdx, TPos, TRef, TSrc, TDst, TPath>;
struct TVMAction {
using EType = EVMAction;
@@ -269,7 +269,7 @@ namespace NSc::NUt {
ui32 CurrArg = 0;
};
- [[nodiscard]]
+ [[nodiscard]]
inline ui32 GetCountWidth(ui32 cnt) {
return MostSignificantBit(cnt - 1) + 1;
}
diff --git a/library/cpp/scheme/tests/fuzz_ops/ut/vm_parse_ut.cpp b/library/cpp/scheme/tests/fuzz_ops/ut/vm_parse_ut.cpp
index ce3786a671..b464bef666 100644
--- a/library/cpp/scheme/tests/fuzz_ops/ut/vm_parse_ut.cpp
+++ b/library/cpp/scheme/tests/fuzz_ops/ut/vm_parse_ut.cpp
@@ -32,14 +32,14 @@ Y_UNIT_TEST_SUITE(TestParseNextAction) {
UNIT_ASSERT(!ParsePos(st));
}
- [[nodiscard]]
+ [[nodiscard]]
ui32 DoTestParsePosSuccess(TVMState& st) {
const auto pos = ParsePos(st);
UNIT_ASSERT(pos);
return pos->Pos;
}
- [[nodiscard]]
+ [[nodiscard]]
ui32 DoTestParsePosSuccess(const TStringBuf inp, const ui32 memSz, const ui32 curPos) {
TVMState st{inp, memSz, curPos};
return DoTestParsePosSuccess(st);
@@ -81,14 +81,14 @@ Y_UNIT_TEST_SUITE(TestParseNextAction) {
UNIT_ASSERT(!ParseRef(st));
}
- [[nodiscard]]
+ [[nodiscard]]
auto DoTestParseRefSuccess(TVMState& st) {
const auto ref = ParseRef(st);
UNIT_ASSERT(ref);
return std::make_pair(ref->Pos, ref->Type);
}
- [[nodiscard]]
+ [[nodiscard]]
auto DoTestParseRefSuccess(const TStringBuf inp, const ui32 memSz, const ui32 curPos) {
TVMState st{inp, memSz, curPos};
return DoTestParseRefSuccess(st);
@@ -118,14 +118,14 @@ Y_UNIT_TEST_SUITE(TestParseNextAction) {
UNIT_ASSERT(!ParseSrc(st));
}
- [[nodiscard]]
+ [[nodiscard]]
auto DoTestParseSrcSuccess(TVMState& st) {
const auto src = ParseSrc(st);
UNIT_ASSERT(src);
return std::make_pair(src->Pos, src->Type);
}
- [[nodiscard]]
+ [[nodiscard]]
auto DoTestParseSrcSuccess(const TStringBuf inp, const ui32 memSz, const ui32 curPos) {
TVMState st{inp, memSz, curPos};
return DoTestParseSrcSuccess(st);
@@ -153,14 +153,14 @@ Y_UNIT_TEST_SUITE(TestParseNextAction) {
UNIT_ASSERT(!ParseDst(st));
}
- [[nodiscard]]
+ [[nodiscard]]
auto DoTestParseDstSuccess(TVMState& st) {
const auto dst = ParseDst(st);
UNIT_ASSERT(dst);
return std::make_pair(dst->Pos, dst->Type);
}
- [[nodiscard]]
+ [[nodiscard]]
auto DoTestParseDstSuccess(const TStringBuf inp, const ui32 memSz, const ui32 curPos) {
TVMState st{inp, memSz, curPos};
return DoTestParseDstSuccess(st);
@@ -201,14 +201,14 @@ Y_UNIT_TEST_SUITE(TestParseNextAction) {
UNIT_ASSERT(!ParsePath(st));
}
- [[nodiscard]]
+ [[nodiscard]]
auto DoTestParsePathSuccess(TVMState& st) {
const auto path = ParsePath(st);
UNIT_ASSERT(path);
return path->Path;
}
- [[nodiscard]]
+ [[nodiscard]]
auto DoTestParsePathSuccess(const TStringBuf inp, const ui32 memSz, const ui32 curPos) {
TVMState st{inp, memSz, curPos};
return DoTestParsePathSuccess(st);
diff --git a/library/cpp/scheme/ut_utils/scheme_ut_utils.h b/library/cpp/scheme/ut_utils/scheme_ut_utils.h
index eb3ea15b2a..58876a9b14 100644
--- a/library/cpp/scheme/ut_utils/scheme_ut_utils.h
+++ b/library/cpp/scheme/ut_utils/scheme_ut_utils.h
@@ -5,7 +5,7 @@
#include <library/cpp/json/json_value.h>
#include <library/cpp/json/json_writer.h>
#include <library/cpp/testing/unittest/registar.h>
-#include <util/string/cast.h>
+#include <util/string/cast.h>
namespace NSc {
namespace NUt {