diff options
author | tobo <tobo@yandex-team.ru> | 2022-02-10 16:47:27 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:47:27 +0300 |
commit | 7fe839092527589b38f014d854c51565b3c1adfa (patch) | |
tree | 309e97022d3530044b712b8f71318c78faf7856e /library/cpp/getopt | |
parent | d0d68c395c10da4cb56a1c845504570a04d7893e (diff) | |
download | ydb-7fe839092527589b38f014d854c51565b3c1adfa.tar.gz |
Restoring authorship annotation for <tobo@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'library/cpp/getopt')
-rw-r--r-- | library/cpp/getopt/last_getopt_demo/demo.cpp | 4 | ||||
-rw-r--r-- | library/cpp/getopt/small/completer.cpp | 2 | ||||
-rw-r--r-- | library/cpp/getopt/small/last_getopt_opt.cpp | 4 | ||||
-rw-r--r-- | library/cpp/getopt/small/last_getopt_opts.cpp | 2 | ||||
-rw-r--r-- | library/cpp/getopt/small/modchooser.h | 24 | ||||
-rw-r--r-- | library/cpp/getopt/ut/last_getopt_ut.cpp | 2 |
6 files changed, 19 insertions, 19 deletions
diff --git a/library/cpp/getopt/last_getopt_demo/demo.cpp b/library/cpp/getopt/last_getopt_demo/demo.cpp index 79426a9cc9..325d359de5 100644 --- a/library/cpp/getopt/last_getopt_demo/demo.cpp +++ b/library/cpp/getopt/last_getopt_demo/demo.cpp @@ -11,12 +11,12 @@ Y_COMPLETER(HeaderCompleter) { bool addPostHeaders = false; for (int i = 0; i < argc; ++i) { - if (argv[i] == TStringBuf("--method") && i + 1 < argc) { + if (argv[i] == TStringBuf("--method") && i + 1 < argc) { auto method = TString(argv[i + 1]); method.to_upper(); addPostHeaders = method == "POST" || method == "PUT"; break; - } else if (argv[i] == TStringBuf("--post-data") || argv[i] == TStringBuf("--post-file")) { + } else if (argv[i] == TStringBuf("--post-data") || argv[i] == TStringBuf("--post-file")) { addPostHeaders = true; break; } diff --git a/library/cpp/getopt/small/completer.cpp b/library/cpp/getopt/small/completer.cpp index 3fff684adb..01169dc081 100644 --- a/library/cpp/getopt/small/completer.cpp +++ b/library/cpp/getopt/small/completer.cpp @@ -219,7 +219,7 @@ namespace NLastGetopt::NComp { namespace { TCustomCompleter* Head = nullptr; - TStringBuf SpecialFlag = "---CUSTOM-COMPLETION---"; + TStringBuf SpecialFlag = "---CUSTOM-COMPLETION---"; } void TCustomCompleter::FireCustomCompleter(int argc, const char** argv) { diff --git a/library/cpp/getopt/small/last_getopt_opt.cpp b/library/cpp/getopt/small/last_getopt_opt.cpp index 9a99437f4b..841a499cb8 100644 --- a/library/cpp/getopt/small/last_getopt_opt.cpp +++ b/library/cpp/getopt/small/last_getopt_opt.cpp @@ -8,8 +8,8 @@ #include <ctype.h> namespace NLastGetopt { - static const TStringBuf ExcludedShortNameChars = "= -\t\n"; - static const TStringBuf ExcludedLongNameChars = "= \t\n"; + static const TStringBuf ExcludedShortNameChars = "= -\t\n"; + static const TStringBuf ExcludedLongNameChars = "= \t\n"; bool TOpt::NameIs(const TString& name) const { for (const auto& next : LongNames_) { diff --git a/library/cpp/getopt/small/last_getopt_opts.cpp b/library/cpp/getopt/small/last_getopt_opts.cpp index 03c432849f..efdf68eecc 100644 --- a/library/cpp/getopt/small/last_getopt_opts.cpp +++ b/library/cpp/getopt/small/last_getopt_opts.cpp @@ -22,7 +22,7 @@ namespace NLastGetoptPrivate { } namespace NLastGetopt { - static const TStringBuf SPad = " "; + static const TStringBuf SPad = " "; void PrintVersionAndExit(const TOptsParser*) { Cout << (NLastGetoptPrivate::VersionString() ? NLastGetoptPrivate::VersionString() : "program version: not linked with library/cpp/getopt") << Endl; diff --git a/library/cpp/getopt/small/modchooser.h b/library/cpp/getopt/small/modchooser.h index 0a8de6d50b..8e32423ab4 100644 --- a/library/cpp/getopt/small/modchooser.h +++ b/library/cpp/getopt/small/modchooser.h @@ -9,12 +9,12 @@ #include <functional> //! Mode function with vector of cli arguments. -using TMainFunctionPtrV = std::function<int(const TVector<TString>&)> ; -using TMainFunctionRawPtrV = int (*)(const TVector<TString>& argv); +using TMainFunctionPtrV = std::function<int(const TVector<TString>&)> ; +using TMainFunctionRawPtrV = int (*)(const TVector<TString>& argv); //! Mode function with classic argc and argv arguments. -using TMainFunctionPtr = std::function<int(int, const char**)> ; -using TMainFunctionRawPtr = int (*)(const int argc, const char** argv); +using TMainFunctionPtr = std::function<int(int, const char**)> ; +using TMainFunctionRawPtr = int (*)(const int argc, const char** argv); //! Mode class with vector of cli arguments. class TMainClassV { @@ -26,7 +26,7 @@ public: //! Mode class with classic argc and argv arguments. class TMainClass { public: - virtual int operator()(int argc, const char** argv) = 0; + virtual int operator()(int argc, const char** argv) = 0; virtual ~TMainClass() = default; }; @@ -47,10 +47,10 @@ public: ~TModChooser(); public: - void AddMode(const TString& mode, TMainFunctionRawPtr func, const TString& description, bool hidden = false, bool noCompletion = false); - void AddMode(const TString& mode, TMainFunctionRawPtrV func, const TString& description, bool hidden = false, bool noCompletion = false); - void AddMode(const TString& mode, TMainFunctionPtr func, const TString& description, bool hidden = false, bool noCompletion = false); - void AddMode(const TString& mode, TMainFunctionPtrV func, const TString& description, bool hidden = false, bool noCompletion = false); + void AddMode(const TString& mode, TMainFunctionRawPtr func, const TString& description, bool hidden = false, bool noCompletion = false); + void AddMode(const TString& mode, TMainFunctionRawPtrV func, const TString& description, bool hidden = false, bool noCompletion = false); + void AddMode(const TString& mode, TMainFunctionPtr func, const TString& description, bool hidden = false, bool noCompletion = false); + void AddMode(const TString& mode, TMainFunctionPtrV func, const TString& description, bool hidden = false, bool noCompletion = false); void AddMode(const TString& mode, TMainClass* func, const TString& description, bool hidden = false, bool noCompletion = false); void AddMode(const TString& mode, TMainClassV* func, const TString& description, bool hidden = false, bool noCompletion = false); @@ -95,7 +95,7 @@ public: * call it and return its return code. * 4) If appropriate mode is not found - return non-zero code. */ - int Run(int argc, const char** argv) const; + int Run(int argc, const char** argv) const; //! Run appropriate mode. Same as Run(const int, const char**) int Run(const TVector<TString>& argv) const; @@ -174,7 +174,7 @@ private: //! Mode class that allows introspecting its console arguments. class TMainClassArgs: public TMainClass { public: - int operator()(int argc, const char** argv) final; + int operator()(int argc, const char** argv) final; public: //! Run this mode. @@ -197,7 +197,7 @@ private: //! Mode class that uses sub-modes to dispatch commands further. class TMainClassModes: public TMainClass { public: - int operator()(int argc, const char** argv) final; + int operator()(int argc, const char** argv) final; public: //! Run this mode. diff --git a/library/cpp/getopt/ut/last_getopt_ut.cpp b/library/cpp/getopt/ut/last_getopt_ut.cpp index c99a1d053d..aa4f469aa4 100644 --- a/library/cpp/getopt/ut/last_getopt_ut.cpp +++ b/library/cpp/getopt/ut/last_getopt_ut.cpp @@ -126,7 +126,7 @@ struct TOptsParserTester { }; namespace { - bool gSimpleFlag = false; + bool gSimpleFlag = false; void SimpleHander(void) { gSimpleFlag = true; } |