aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/getopt/small/modchooser.cpp
diff options
context:
space:
mode:
authorhr0nix <hr0nix@yandex-team.ru>2022-02-10 16:49:59 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:49:59 +0300
commitba105fe2a44ef4553a9c1dabc9c632702a59c965 (patch)
tree5a1c2910a8fdb90aafc4c0eba551a437e57385b1 /library/cpp/getopt/small/modchooser.cpp
parent042dfdfd1388209ce3aa06dca56bd52ec63d40b2 (diff)
downloadydb-ba105fe2a44ef4553a9c1dabc9c632702a59c965.tar.gz
Restoring authorship annotation for <hr0nix@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'library/cpp/getopt/small/modchooser.cpp')
-rw-r--r--library/cpp/getopt/small/modchooser.cpp28
1 files changed, 14 insertions, 14 deletions
diff --git a/library/cpp/getopt/small/modchooser.cpp b/library/cpp/getopt/small/modchooser.cpp
index 2fa5cfd070..5a4bbea034 100644
--- a/library/cpp/getopt/small/modchooser.cpp
+++ b/library/cpp/getopt/small/modchooser.cpp
@@ -69,15 +69,15 @@ TModChooser::TMode::TMode(const TString& name, TMainClass* main, const TString&
{
}
-TModChooser::TModChooser()
+TModChooser::TModChooser()
: ModesHelpOption("-?") // Default help option in last_getopt
, VersionHandler(nullptr)
, ShowSeparated(true)
, SvnRevisionOptionDisabled(false)
, PrintShortCommandInUsage(false)
-{
-}
-
+{
+}
+
TModChooser::~TModChooser() = default;
void TModChooser::AddMode(const TString& mode, const TMainFunctionRawPtr func, const TString& description, bool hidden, bool noCompletion) {
@@ -133,13 +133,13 @@ void TModChooser::SetDescription(const TString& descr) {
}
void TModChooser::SetModesHelpOption(const TString& helpOption) {
- ModesHelpOption = helpOption;
-}
-
-void TModChooser::SetVersionHandler(TVersionHandlerPtr handler) {
- VersionHandler = handler;
-}
-
+ ModesHelpOption = helpOption;
+}
+
+void TModChooser::SetVersionHandler(TVersionHandlerPtr handler) {
+ VersionHandler = handler;
+}
+
void TModChooser::SetSeparatedMode(bool separated) {
ShowSeparated = separated;
}
@@ -185,9 +185,9 @@ int TModChooser::Run(const int argc, const char** argv) const {
return 0;
}
if (VersionHandler && (modeName == "-v" || modeName == "--version")) {
- VersionHandler();
- return 0;
- }
+ VersionHandler();
+ return 0;
+ }
if (!SvnRevisionOptionDisabled && modeName == "--svnrevision") {
NLastGetopt::PrintVersionAndExit(nullptr);
}