aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authordanlark <danlark@yandex-team.ru>2022-02-10 16:46:08 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:46:08 +0300
commit3426a9bc7f169ae9da54cef557ad2a33f6e8eee0 (patch)
tree26154e1e9990f1bb4525d3e3fb5b6dac2c2c1da2 /tools
parentcb68f224c46a8ee52ac3fdd2a32534b8bb8dc134 (diff)
downloadydb-3426a9bc7f169ae9da54cef557ad2a33f6e8eee0.tar.gz
Restoring authorship annotation for <danlark@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'tools')
-rw-r--r--tools/archiver/alignment_test/alignment_ut.cpp16
-rw-r--r--tools/archiver/main.cpp20
-rw-r--r--tools/enum_parser/enum_parser/main.cpp4
-rw-r--r--tools/enum_parser/enum_serialization_runtime/enum_runtime.cpp2
-rw-r--r--tools/fix_elf/patch.cpp2
-rw-r--r--tools/rescompressor/main.cpp8
-rw-r--r--tools/rorescompiler/main.cpp4
7 files changed, 28 insertions, 28 deletions
diff --git a/tools/archiver/alignment_test/alignment_ut.cpp b/tools/archiver/alignment_test/alignment_ut.cpp
index 88b07e19b0..a40e2e28c5 100644
--- a/tools/archiver/alignment_test/alignment_ut.cpp
+++ b/tools/archiver/alignment_test/alignment_ut.cpp
@@ -20,10 +20,10 @@ Y_UNIT_TEST_SUITE(AlignmentTest) {
);
auto dataFile1 = dataArchive.BlobByKey("/data_file.txt");
auto dataFile2 = dataArchive.BlobByKey("/data_file2.txt");
- UNIT_ASSERT_NO_DIFF(TStringBuf(dataFile1.AsCharPtr(), dataFile1.Size()), "some text\n");
- UNIT_ASSERT_NO_DIFF(TStringBuf(dataFile2.AsCharPtr(), dataFile2.Size()), "second file content\n");
- UNIT_ASSERT_VALUES_EQUAL(size_t(dataFile1.AsCharPtr()) % ArchiveWriterDefaultDataAlignment, 0);
- UNIT_ASSERT_VALUES_EQUAL(size_t(dataFile2.AsCharPtr()) % ArchiveWriterDefaultDataAlignment, 0);
+ UNIT_ASSERT_NO_DIFF(TStringBuf(dataFile1.AsCharPtr(), dataFile1.Size()), "some text\n");
+ UNIT_ASSERT_NO_DIFF(TStringBuf(dataFile2.AsCharPtr(), dataFile2.Size()), "second file content\n");
+ UNIT_ASSERT_VALUES_EQUAL(size_t(dataFile1.AsCharPtr()) % ArchiveWriterDefaultDataAlignment, 0);
+ UNIT_ASSERT_VALUES_EQUAL(size_t(dataFile2.AsCharPtr()) % ArchiveWriterDefaultDataAlignment, 0);
}
Y_UNIT_TEST(ArchiveAsmCheck) {
@@ -33,9 +33,9 @@ Y_UNIT_TEST_SUITE(AlignmentTest) {
);
auto dataFile1 = dataArchive.BlobByKey("/data_file.txt");
auto dataFile2 = dataArchive.BlobByKey("/data_file2.txt");
- UNIT_ASSERT_NO_DIFF(TStringBuf(dataFile1.AsCharPtr(), dataFile1.Size()), "some text\n");
- UNIT_ASSERT_NO_DIFF(TStringBuf(dataFile2.AsCharPtr(), dataFile2.Size()), "second file content\n");
- UNIT_ASSERT_VALUES_EQUAL(size_t(dataFile1.AsCharPtr()) % ArchiveWriterDefaultDataAlignment, 0);
- UNIT_ASSERT_VALUES_EQUAL(size_t(dataFile2.AsCharPtr()) % ArchiveWriterDefaultDataAlignment, 0);
+ UNIT_ASSERT_NO_DIFF(TStringBuf(dataFile1.AsCharPtr(), dataFile1.Size()), "some text\n");
+ UNIT_ASSERT_NO_DIFF(TStringBuf(dataFile2.AsCharPtr(), dataFile2.Size()), "second file content\n");
+ UNIT_ASSERT_VALUES_EQUAL(size_t(dataFile1.AsCharPtr()) % ArchiveWriterDefaultDataAlignment, 0);
+ UNIT_ASSERT_VALUES_EQUAL(size_t(dataFile2.AsCharPtr()) % ArchiveWriterDefaultDataAlignment, 0);
}
}
diff --git a/tools/archiver/main.cpp b/tools/archiver/main.cpp
index 6cda54c1ea..3648d6647f 100644
--- a/tools/archiver/main.cpp
+++ b/tools/archiver/main.cpp
@@ -34,7 +34,7 @@ namespace {
void DoWrite(const void* data, size_t len) override {
for (const char* p = (const char*)data; len > 0; ++p, --len) {
Buf.append(*p);
- if (Buf.size() == Stride)
+ if (Buf.size() == Stride)
WriteBuf();
}
}
@@ -319,7 +319,7 @@ static inline TString GetFile(const TString& s) {
}
static inline TString Fix(TString f) {
- if (!f.empty() && IsDelim(f[f.size() - 1])) {
+ if (!f.empty() && IsDelim(f[f.size() - 1])) {
f.pop_back();
}
@@ -374,7 +374,7 @@ namespace {
if (IsDir(Path)) {
DoRecurse(w, "/");
} else {
- Append(w, Path, Key.size() ? Key : Prefix + "/" + GetFile(Path));
+ Append(w, Path, Key.size() ? Key : Prefix + "/" + GetFile(Path));
}
}
@@ -605,15 +605,15 @@ int main(int argc, char** argv) {
const auto& files = optsRes.GetFreeArgs();
TVector<TStringBuf> keys;
- if (forceKeys.size())
- StringSplitter(forceKeys).Split(':').SkipEmpty().Collect(&keys);
+ if (forceKeys.size())
+ StringSplitter(forceKeys).Split(':').SkipEmpty().Collect(&keys);
- if (keys.size() && keys.size() != files.size()) {
+ if (keys.size() && keys.size() != files.size()) {
Cerr << "Invalid number of keys=" << keys.size() << " (!= number of files=" << files.size() << ")" << Endl;
return 1;
}
- for (size_t i = 0; i < files.size(); ++i) {
+ for (size_t i = 0; i < files.size(); ++i) {
const auto& path = files[i];
size_t off = 0;
#ifdef _win_
@@ -625,7 +625,7 @@ int main(int argc, char** argv) {
cur.Path = path.substr(0, pos);
if (pos != TString::npos)
cur.Prefix = path.substr(pos + 1);
- if (keys.size())
+ if (keys.size())
cur.Key = keys[i];
cur.Recursive = recursive;
cur.Fix();
@@ -665,7 +665,7 @@ int main(int argc, char** argv) {
out = hexout.Get();
}
- outf->Write(prepend.data(), prepend.size());
+ outf->Write(prepend.data(), prepend.size());
if (cat) {
for (const auto& rec: recs) {
@@ -691,7 +691,7 @@ int main(int argc, char** argv) {
} catch (...) {
}
- outf->Write(append.data(), append.size());
+ outf->Write(append.data(), append.size());
}
} catch (...) {
Cerr << CurrentExceptionMessage() << Endl;
diff --git a/tools/enum_parser/enum_parser/main.cpp b/tools/enum_parser/enum_parser/main.cpp
index 0943c69c1d..f851579ffb 100644
--- a/tools/enum_parser/enum_parser/main.cpp
+++ b/tools/enum_parser/enum_parser/main.cpp
@@ -104,7 +104,7 @@ void OutItem(IOutputStream& out, const T& value, bool escape = true) {
static inline void FinishItems(TStringStream& out) {
TString& s = out.Str();
if (s.EndsWith(",\n")) {
- s.remove(s.size() - 2, 2);
+ s.remove(s.size() - 2, 2);
}
if (s.EndsWith(",")) {
s.pop_back();
@@ -141,7 +141,7 @@ void GenerateEnum(
TStringStream jEnum;
OpenMap(jEnum);
- size_t count = en.Items.size();
+ size_t count = en.Items.size();
OutKey(jEnum, "count", count);
const TString name = TEnumParser::ScopeStr(en.Scope) + en.CppName;
OutKey(jEnum, "full_name", name);
diff --git a/tools/enum_parser/enum_serialization_runtime/enum_runtime.cpp b/tools/enum_parser/enum_serialization_runtime/enum_runtime.cpp
index 73d38b396a..30cd077c84 100644
--- a/tools/enum_parser/enum_serialization_runtime/enum_runtime.cpp
+++ b/tools/enum_parser/enum_serialization_runtime/enum_runtime.cpp
@@ -76,7 +76,7 @@ namespace NEnumSerializationRuntime {
AllValues.reserve(Names.size());
for (const auto& it : Names) {
- if (!AllNames.empty()) {
+ if (!AllNames.empty()) {
AllNames += ", ";
}
AllNames += TString::Join('\'', it.second, '\'');
diff --git a/tools/fix_elf/patch.cpp b/tools/fix_elf/patch.cpp
index d49ebab307..e31567ae90 100644
--- a/tools/fix_elf/patch.cpp
+++ b/tools/fix_elf/patch.cpp
@@ -61,7 +61,7 @@ void ReadNum(TStringBuf& src, TStringBuf& dst) {
}
int NumericStrCmp(TStringBuf s1, TStringBuf s2) {
- while (!s1.empty() || !s2.empty()) {
+ while (!s1.empty() || !s2.empty()) {
char c1 = *s1.data();
char c2 = *s2.data();
diff --git a/tools/rescompressor/main.cpp b/tools/rescompressor/main.cpp
index 9aba1002c5..1dfad1fe28 100644
--- a/tools/rescompressor/main.cpp
+++ b/tools/rescompressor/main.cpp
@@ -51,17 +51,17 @@ private:
void WriteIncBin(TStringBuf constname, TStringBuf filename, const TString& data) {
AsmOut << AsmPrefix << constname << ":\nincbin \"" << Basename(filename) << "\"\n";
AsmOut << ".end:\n";
- TFixedBufferFileOutput out(filename.data());
+ TFixedBufferFileOutput out(filename.data());
out << data;
}
void WriteRaw(TStringBuf constname, const TString& data) {
AsmOut << AsmPrefix << constname << ":\ndb ";
- for (size_t i = 0; i < data.size() - 1; i++) {
+ for (size_t i = 0; i < data.size() - 1; i++) {
unsigned char c = static_cast<unsigned char>(data[i]);
AsmOut << IntToString<10, unsigned char>(c) << ",";
}
- AsmOut << IntToString<10, unsigned char>(static_cast<unsigned char>(data[data.size() - 1])) << "\n";
+ AsmOut << IntToString<10, unsigned char>(static_cast<unsigned char>(data[data.size() - 1])) << "\n";
AsmOut << ".end:\n";
}
@@ -131,7 +131,7 @@ int main(int argc, char** argv) {
else {
TUnbufferedFileInput inp(argv[ind]);
TString data = inp.ReadAll();
- compressed = Compress(TStringBuf(data.data(), data.size()));
+ compressed = Compress(TStringBuf(data.data(), data.size()));
raw = false;
}
ind++;
diff --git a/tools/rorescompiler/main.cpp b/tools/rorescompiler/main.cpp
index 7ca5346e4c..2cff76725b 100644
--- a/tools/rorescompiler/main.cpp
+++ b/tools/rorescompiler/main.cpp
@@ -5,7 +5,7 @@
#include <util/stream/file.h>
#include <util/string/escape.h>
#include <util/string/vector.h>
-#include <util/string/split.h>
+#include <util/string/split.h>
using namespace NResource;
@@ -32,7 +32,7 @@ int main(int argc, char** argv) {
out << "#include <library/cpp/resource/registry.h>\n\n";
while (*argv) {
- TVector<TString> items = StringSplitter(TString(*(argv))).Split('=').Limit(2).ToList<TString>();
+ TVector<TString> items = StringSplitter(TString(*(argv))).Split('=').Limit(2).ToList<TString>();
GenOne(items[0], items[1], out);
argv++;
}