diff options
author | alejandro <alejandro@yandex-team.ru> | 2022-02-10 16:50:54 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:50:54 +0300 |
commit | a24597741ed0c290312a4e021954d5088e5281a8 (patch) | |
tree | eabcdbc4cc9a530913f0db8b96028f2f3b6d7c88 /library/cpp/getopt/small/modchooser.cpp | |
parent | 18b9863882c0f9638e4a6599acbcdfe6109d5da0 (diff) | |
download | ydb-a24597741ed0c290312a4e021954d5088e5281a8.tar.gz |
Restoring authorship annotation for <alejandro@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'library/cpp/getopt/small/modchooser.cpp')
-rw-r--r-- | library/cpp/getopt/small/modchooser.cpp | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/library/cpp/getopt/small/modchooser.cpp b/library/cpp/getopt/small/modchooser.cpp index 2fa5cfd070..37c97f6245 100644 --- a/library/cpp/getopt/small/modchooser.cpp +++ b/library/cpp/getopt/small/modchooser.cpp @@ -61,9 +61,9 @@ private: }; TModChooser::TMode::TMode(const TString& name, TMainClass* main, const TString& descr, bool hidden, bool noCompletion) - : Name(name) - , Main(main) - , Description(descr) + : Name(name) + , Main(main) + , Description(descr) , Hidden(hidden) , NoCompletion(noCompletion) { @@ -113,8 +113,8 @@ void TModChooser::AddMode(const TString& mode, TMainClassV* func, const TString& void TModChooser::AddGroupModeDescription(const TString& description, bool hidden, bool noCompletion) { UnsortedModes.push_back(MakeHolder<TMode>(TString(), nullptr, description.data(), hidden, noCompletion)); -} - +} + void TModChooser::SetDefaultMode(const TString& mode) { DefaultMode = mode; } @@ -140,14 +140,14 @@ void TModChooser::SetVersionHandler(TVersionHandlerPtr handler) { VersionHandler = handler; } -void TModChooser::SetSeparatedMode(bool separated) { - ShowSeparated = separated; -} - +void TModChooser::SetSeparatedMode(bool separated) { + ShowSeparated = separated; +} + void TModChooser::SetSeparationString(const TString& str) { - SeparationString = str; -} - + SeparationString = str; +} + void TModChooser::SetPrintShortCommandInUsage(bool printShortCommandInUsage = false) { PrintShortCommandInUsage = printShortCommandInUsage; } @@ -289,7 +289,7 @@ void TModChooser::PrintHelp(const TString& progName) const { maxModeLen = Max(maxModeLen, mode->CalculateFullNameLen()); } - if (ShowSeparated) { + if (ShowSeparated) { for (const auto& unsortedMode : UnsortedModes) if (!unsortedMode->Hidden) { if (unsortedMode->Name.size()) { @@ -298,8 +298,8 @@ void TModChooser::PrintHelp(const TString& progName) const { Cerr << SeparationString << Endl; Cerr << unsortedMode->Description << Endl; } - } - } else { + } + } else { for (const auto& mode : Modes) { if (mode.first != mode.second->Name) continue; // this is an alias @@ -308,7 +308,7 @@ void TModChooser::PrintHelp(const TString& progName) const { Cerr << " " << mode.second->FormatFullName(maxModeLen + 4) << mode.second->Description << Endl; } } - } + } Cerr << Endl; Cerr << "To get help for specific mode type '" << progName << " MODE " << ModesHelpOption << "'" << Endl; |