diff options
author | rnefyodov <rnefyodov@yandex-team.ru> | 2022-02-10 16:47:17 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:47:17 +0300 |
commit | c22320e8c4f3d7be38c504706f137034e91d31e6 (patch) | |
tree | 35cc6c382a1bd8cb932449ffa734056fcc73e6d4 /library/cpp | |
parent | 93e9e4639b6ee2afbdf45cf3927cea6d340e19b0 (diff) | |
download | ydb-c22320e8c4f3d7be38c504706f137034e91d31e6.tar.gz |
Restoring authorship annotation for <rnefyodov@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'library/cpp')
-rw-r--r-- | library/cpp/cgiparam/fuzz/ya.make | 2 | ||||
-rw-r--r-- | library/cpp/colorizer/colors.cpp | 94 | ||||
-rw-r--r-- | library/cpp/colorizer/colors.h | 18 | ||||
-rw-r--r-- | library/cpp/colorizer/output.h | 22 | ||||
-rw-r--r-- | library/cpp/http/fetch/ya.make | 2 | ||||
-rw-r--r-- | library/cpp/http/io/fuzz/ya.make | 2 | ||||
-rw-r--r-- | library/cpp/json/fuzzy_test/ya.make | 2 | ||||
-rw-r--r-- | library/cpp/resource/registry.cpp | 2 | ||||
-rw-r--r-- | library/cpp/testing/unittest/utmain.cpp | 26 |
9 files changed, 85 insertions, 85 deletions
diff --git a/library/cpp/cgiparam/fuzz/ya.make b/library/cpp/cgiparam/fuzz/ya.make index 8fb9d50d3b..e55c7e9634 100644 --- a/library/cpp/cgiparam/fuzz/ya.make +++ b/library/cpp/cgiparam/fuzz/ya.make @@ -1,4 +1,4 @@ -FUZZ() +FUZZ() OWNER( pg diff --git a/library/cpp/colorizer/colors.cpp b/library/cpp/colorizer/colors.cpp index decc5c9847..85c148893b 100644 --- a/library/cpp/colorizer/colors.cpp +++ b/library/cpp/colorizer/colors.cpp @@ -1,9 +1,9 @@ #include "colors.h" - + #include <util/stream/output.h> #include <util/generic/singleton.h> #include <util/system/env.h> - + #include <cstdlib> #if defined(_unix_) @@ -11,7 +11,7 @@ #endif using namespace NColorizer; - + namespace { constexpr TStringBuf ToStringBufC(NColorizer::EAnsiCode x) { switch(x) { @@ -171,30 +171,30 @@ TColors::TColors(FILE* f) { SetIsTTY(CalcIsTTY(f)); } - + TColors::TColors(bool ontty) : IsTTY_(true) { SetIsTTY(ontty); -} - +} + TStringBuf TColors::Reset() const noexcept { return IsTTY() ? ToStringBufC(EAnsiCode::RESET) : ToStringBufC(EAnsiCode::INVALID); -} - +} + TStringBuf TColors::StyleLight() const noexcept { return IsTTY() ? ToStringBufC(EAnsiCode::ST_LIGHT) : ToStringBufC(EAnsiCode::INVALID); -} +} TStringBuf TColors::StyleDark() const noexcept { return IsTTY() ? ToStringBufC(EAnsiCode::ST_DARK) : ToStringBufC(EAnsiCode::INVALID); } TStringBuf TColors::StyleNormal() const noexcept { return IsTTY() ? ToStringBufC(EAnsiCode::ST_NORMAL) : ToStringBufC(EAnsiCode::INVALID); } - + TStringBuf TColors::ItalicOn() const noexcept { return IsTTY() ? ToStringBufC(EAnsiCode::ITALIC_ON) : ToStringBufC(EAnsiCode::INVALID); -} +} TStringBuf TColors::ItalicOff() const noexcept { return IsTTY() ? ToStringBufC(EAnsiCode::ITALIC_OFF) : ToStringBufC(EAnsiCode::INVALID); } @@ -204,10 +204,10 @@ TStringBuf TColors::UnderlineOn() const noexcept { TStringBuf TColors::UnderlineOff() const noexcept { return IsTTY() ? ToStringBufC(EAnsiCode::UNDERLINE_OFF) : ToStringBufC(EAnsiCode::INVALID); } - + TStringBuf TColors::ForeDefault() const noexcept { return IsTTY() ? ToStringBufC(EAnsiCode::FG_DEFAULT) : ToStringBufC(EAnsiCode::INVALID); -} +} TStringBuf TColors::ForeBlack() const noexcept { return IsTTY() ? ToStringBufC(EAnsiCode::FG_BLACK) : ToStringBufC(EAnsiCode::INVALID); } @@ -232,10 +232,10 @@ TStringBuf TColors::ForeCyan() const noexcept { TStringBuf TColors::ForeWhite() const noexcept { return IsTTY() ? ToStringBufC(EAnsiCode::FG_WHITE) : ToStringBufC(EAnsiCode::INVALID); } - + TStringBuf TColors::BackDefault() const noexcept { return IsTTY() ? ToStringBufC(EAnsiCode::BG_DEFAULT) : ToStringBufC(EAnsiCode::INVALID); -} +} TStringBuf TColors::BackBlack() const noexcept { return IsTTY() ? ToStringBufC(EAnsiCode::BG_BLACK) : ToStringBufC(EAnsiCode::INVALID); } @@ -260,10 +260,10 @@ TStringBuf TColors::BackCyan() const noexcept { TStringBuf TColors::BackWhite() const noexcept { return IsTTY() ? ToStringBufC(EAnsiCode::BG_WHITE) : ToStringBufC(EAnsiCode::INVALID); } - + TStringBuf TColors::Default() const noexcept { return IsTTY() ? ToStringBufC(EAnsiCode::DEFAULT) : ToStringBufC(EAnsiCode::INVALID); -} +} TStringBuf TColors::Black() const noexcept { return IsTTY() ? ToStringBufC(EAnsiCode::BLACK) : ToStringBufC(EAnsiCode::INVALID); } @@ -288,10 +288,10 @@ TStringBuf TColors::Cyan() const noexcept { TStringBuf TColors::White() const noexcept { return IsTTY() ? ToStringBufC(EAnsiCode::WHITE) : ToStringBufC(EAnsiCode::INVALID); } - + TStringBuf TColors::LightDefault() const noexcept { return IsTTY() ? ToStringBufC(EAnsiCode::LIGHT_DEFAULT) : ToStringBufC(EAnsiCode::INVALID); -} +} TStringBuf TColors::LightBlack() const noexcept { return IsTTY() ? ToStringBufC(EAnsiCode::LIGHT_BLACK) : ToStringBufC(EAnsiCode::INVALID); } @@ -316,10 +316,10 @@ TStringBuf TColors::LightCyan() const noexcept { TStringBuf TColors::LightWhite() const noexcept { return IsTTY() ? ToStringBufC(EAnsiCode::LIGHT_WHITE) : ToStringBufC(EAnsiCode::INVALID); } - + TStringBuf TColors::DarkDefault() const noexcept { return IsTTY() ? ToStringBufC(EAnsiCode::DARK_DEFAULT) : ToStringBufC(EAnsiCode::INVALID); -} +} TStringBuf TColors::DarkBlack() const noexcept { return IsTTY() ? ToStringBufC(EAnsiCode::DARK_BLACK) : ToStringBufC(EAnsiCode::INVALID); } @@ -344,47 +344,47 @@ TStringBuf TColors::DarkCyan() const noexcept { TStringBuf TColors::DarkWhite() const noexcept { return IsTTY() ? ToStringBufC(EAnsiCode::DARK_WHITE) : ToStringBufC(EAnsiCode::INVALID); } - + TStringBuf TColors::OldColor() const noexcept { return IsTTY() ? "\033[22;39m" : ""; -} - +} + TStringBuf TColors::BoldColor() const noexcept { return IsTTY() ? "\033[1m" : ""; -} - +} + TStringBuf TColors::BlackColor() const noexcept { return IsTTY() ? "\033[22;30m" : ""; -} - +} + TStringBuf TColors::BlueColor() const noexcept { return IsTTY() ? "\033[22;34m" : ""; -} - +} + TStringBuf TColors::GreenColor() const noexcept { return IsTTY() ? "\033[22;32m" : ""; -} - +} + TStringBuf TColors::CyanColor() const noexcept { return IsTTY() ? "\033[22;36m" : ""; -} - +} + TStringBuf TColors::RedColor() const noexcept { return IsTTY() ? "\033[22;31m" : ""; -} - +} + TStringBuf TColors::PurpleColor() const noexcept { return IsTTY() ? "\033[22;35m" : ""; -} - +} + TStringBuf TColors::BrownColor() const noexcept { return IsTTY() ? "\033[22;33m" : ""; -} - +} + TStringBuf TColors::LightGrayColor() const noexcept { return IsTTY() ? "\033[22;37m" : ""; -} - +} + TStringBuf TColors::DarkGrayColor() const noexcept { return IsTTY() ? "\033[1;30m" : ""; } @@ -404,15 +404,15 @@ TStringBuf TColors::LightCyanColor() const noexcept { TStringBuf TColors::LightRedColor() const noexcept { return IsTTY() ? "\033[1;31m" : ""; } - + TStringBuf TColors::LightPurpleColor() const noexcept { return IsTTY() ? "\033[1;35m" : ""; -} - +} + TStringBuf TColors::YellowColor() const noexcept { return IsTTY() ? "\033[1;33m" : ""; -} - +} + TStringBuf TColors::WhiteColor() const noexcept { return IsTTY() ? "\033[1;37m" : ""; } diff --git a/library/cpp/colorizer/colors.h b/library/cpp/colorizer/colors.h index 474a918994..2966c98375 100644 --- a/library/cpp/colorizer/colors.h +++ b/library/cpp/colorizer/colors.h @@ -1,10 +1,10 @@ -#pragma once +#pragma once #include "fwd.h" - + #include <util/generic/string.h> #include <util/generic/strbuf.h> - + #include <cstdio> namespace NColorizer { @@ -106,13 +106,13 @@ namespace NColorizer { public: explicit TColors(FILE* = stderr); explicit TColors(bool ontty); - + TStringBuf Reset() const noexcept; - + TStringBuf StyleLight() const noexcept; TStringBuf StyleDark() const noexcept; TStringBuf StyleNormal() const noexcept; - + TStringBuf ItalicOn() const noexcept; TStringBuf ItalicOff() const noexcept; TStringBuf UnderlineOn() const noexcept; @@ -195,7 +195,7 @@ namespace NColorizer { inline bool IsTTY() const noexcept { return IsTTY_; } - + inline void SetIsTTY(bool value) noexcept { IsTTY_ = value; } @@ -210,7 +210,7 @@ namespace NColorizer { private: bool IsTTY_; - }; + }; /// Singletone `TColors` instances for stderr/stdout. TColors& StdErr(); @@ -222,7 +222,7 @@ namespace NColorizer { /// Calculate total length of all ANSI escape codes in the text. size_t TotalAnsiEscapeCodeLen(TStringBuf text); -} +} TStringBuf ToStringBuf(NColorizer::EAnsiCode x); TString ToString(NColorizer::EAnsiCode x); diff --git a/library/cpp/colorizer/output.h b/library/cpp/colorizer/output.h index 99afbd3427..e2d5afcec4 100644 --- a/library/cpp/colorizer/output.h +++ b/library/cpp/colorizer/output.h @@ -25,19 +25,19 @@ namespace NColorizer { } DEF(Old) - DEF(Black) + DEF(Black) DEF(Green) - DEF(Cyan) + DEF(Cyan) DEF(Red) - DEF(Purple) - DEF(Brown) - DEF(LightGray) - DEF(DarkGray) - DEF(LightBlue) - DEF(LightGreen) - DEF(LightCyan) - DEF(LightRed) - DEF(LightPurple) + DEF(Purple) + DEF(Brown) + DEF(LightGray) + DEF(DarkGray) + DEF(LightBlue) + DEF(LightGreen) + DEF(LightCyan) + DEF(LightRed) + DEF(LightPurple) DEF(Yellow) DEF(White) diff --git a/library/cpp/http/fetch/ya.make b/library/cpp/http/fetch/ya.make index 7737127463..bda332045a 100644 --- a/library/cpp/http/fetch/ya.make +++ b/library/cpp/http/fetch/ya.make @@ -31,7 +31,7 @@ SRCS( GENERATE_ENUM_SERIALIZATION(httpheader.h) -SET(RAGEL6_FLAGS -CF1) +SET(RAGEL6_FLAGS -CF1) END() diff --git a/library/cpp/http/io/fuzz/ya.make b/library/cpp/http/io/fuzz/ya.make index 8b3ccb1969..0a901fe0d4 100644 --- a/library/cpp/http/io/fuzz/ya.make +++ b/library/cpp/http/io/fuzz/ya.make @@ -1,4 +1,4 @@ -FUZZ() +FUZZ() OWNER( pg diff --git a/library/cpp/json/fuzzy_test/ya.make b/library/cpp/json/fuzzy_test/ya.make index ff50bc1f62..aec610841f 100644 --- a/library/cpp/json/fuzzy_test/ya.make +++ b/library/cpp/json/fuzzy_test/ya.make @@ -1,4 +1,4 @@ -FUZZ() +FUZZ() OWNER(pg) diff --git a/library/cpp/resource/registry.cpp b/library/cpp/resource/registry.cpp index 66001c4769..8f5a718a81 100644 --- a/library/cpp/resource/registry.cpp +++ b/library/cpp/resource/registry.cpp @@ -40,7 +40,7 @@ namespace { " new size: %zu.", TString{key}.Quote().c_str(), vsize, dsize); } - } + } } else { D_.push_back(TDescriptor(key, data)); (*this)[key] = &D_.back(); diff --git a/library/cpp/testing/unittest/utmain.cpp b/library/cpp/testing/unittest/utmain.cpp index 305bc6b40f..55564fd3d3 100644 --- a/library/cpp/testing/unittest/utmain.cpp +++ b/library/cpp/testing/unittest/utmain.cpp @@ -542,28 +542,28 @@ public: TEnumeratingProcessor(bool verbose, IOutputStream& stream) noexcept : Verbose_(verbose) , Stream_(stream) - { - } - + { + } + ~TEnumeratingProcessor() override { } bool CheckAccess(TString name, size_t /*num*/) override { - if (Verbose_) { - return true; - } else { + if (Verbose_) { + return true; + } else { Stream_ << name << "\n"; - return false; - } - } - + return false; + } + } + bool CheckAccessTest(TString suite, const char* name) override { Stream_ << suite << "::" << name << "\n"; return false; } - -private: - bool Verbose_; + +private: + bool Verbose_; IOutputStream& Stream_; }; |