diff options
author | danlark <danlark@yandex-team.ru> | 2022-02-10 16:46:08 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:46:08 +0300 |
commit | 3426a9bc7f169ae9da54cef557ad2a33f6e8eee0 (patch) | |
tree | 26154e1e9990f1bb4525d3e3fb5b6dac2c2c1da2 /library/cpp/getopt | |
parent | cb68f224c46a8ee52ac3fdd2a32534b8bb8dc134 (diff) | |
download | ydb-3426a9bc7f169ae9da54cef557ad2a33f6e8eee0.tar.gz |
Restoring authorship annotation for <danlark@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'library/cpp/getopt')
-rw-r--r-- | library/cpp/getopt/small/last_getopt.h | 2 | ||||
-rw-r--r-- | library/cpp/getopt/small/last_getopt_opts.cpp | 4 | ||||
-rw-r--r-- | library/cpp/getopt/small/opt2.cpp | 8 | ||||
-rw-r--r-- | library/cpp/getopt/small/ygetopt.cpp | 2 | ||||
-rw-r--r-- | library/cpp/getopt/ut/last_getopt_ut.cpp | 8 |
5 files changed, 12 insertions, 12 deletions
diff --git a/library/cpp/getopt/small/last_getopt.h b/library/cpp/getopt/small/last_getopt.h index 07687bc914..dc795741c4 100644 --- a/library/cpp/getopt/small/last_getopt.h +++ b/library/cpp/getopt/small/last_getopt.h @@ -5,7 +5,7 @@ #include "last_getopt_parse_result.h" #include <util/generic/function.h> -#include <util/string/split.h> +#include <util/string/split.h> /// see some documentation in /// https://wiki.yandex-team.ru/development/poisk/arcadia/util/lastgetopt/ diff --git a/library/cpp/getopt/small/last_getopt_opts.cpp b/library/cpp/getopt/small/last_getopt_opts.cpp index 03c432849f..27a3dee5b2 100644 --- a/library/cpp/getopt/small/last_getopt_opts.cpp +++ b/library/cpp/getopt/small/last_getopt_opts.cpp @@ -297,7 +297,7 @@ namespace NLastGetopt { static const TString metavarDef("VAL"); const TString& title = option->GetArgTitle(); - const TString& metavar = title.empty() ? metavarDef : title; + const TString& metavar = title.empty() ? metavarDef : title; if (option->GetHasArg() == OPTIONAL_ARGUMENT) { result << " [" << metavar; @@ -414,7 +414,7 @@ namespace NLastGetopt { } else { os << SPad << leftColumn[i] << ' '; if (leftColumnSizes[i] < leftWidth) - os << TStringBuf(leftPadding.data(), leftWidth - leftColumnSizes[i]); + os << TStringBuf(leftPadding.data(), leftWidth - leftColumnSizes[i]); } TStringBuf help = opt->GetHelp(); diff --git a/library/cpp/getopt/small/opt2.cpp b/library/cpp/getopt/small/opt2.cpp index 0cdc774e78..f53d8c132d 100644 --- a/library/cpp/getopt/small/opt2.cpp +++ b/library/cpp/getopt/small/opt2.cpp @@ -106,9 +106,9 @@ void Opt2::EatArgv(const char* optspec, const char* long_alias) { // long option always spans one argv (--switch or --option-name=value) const char* eq = strchr(s, '='); TString lname(s, eq ? (size_t)(eq - s) : (size_t)strlen(s)); - THashMap<const char*, char>::iterator i = long2short.find(lname.data()); + THashMap<const char*, char>::iterator i = long2short.find(lname.data()); if (i == long2short.end()) { - UnknownLongOption = strdup(lname.data()); // free'd in AutoUsage() + UnknownLongOption = strdup(lname.data()); // free'd in AutoUsage() HasErrors = true; return; } @@ -273,7 +273,7 @@ int Opt2::AutoUsage(const char* free_arg_names) { nreq ? " [-" : "", nreq_str, nreq ? "]" : "", free_arg_names && *free_arg_names ? " " : "", free_arg_names); for (auto& spec : Specs) { - const char* hlp = !spec.HelpUsage.empty() ? spec.HelpUsage.data() : spec.HasArg ? "<arg>" : ""; + const char* hlp = !spec.HelpUsage.empty() ? spec.HelpUsage.data() : spec.HasArg ? "<arg>" : ""; if (!spec.HasArg || spec.IsRequired) fprintf(where, " -%c %s\n", spec.opt, hlp); else if (!spec.IsNumeric) @@ -301,7 +301,7 @@ int Opt2::AutoUsage(const char* free_arg_names) { if (BadPosCount && MinArgs == MaxArgs) fprintf(where, " *** %i free argument(s) supplied, expected %i\n", (int)Pos.size(), MinArgs); for (const auto& userErrorMessage : UserErrorMessages) - fprintf(where, " *** %s\n", userErrorMessage.data()); + fprintf(where, " *** %s\n", userErrorMessage.data()); return UnknownOption == '?' ? 1 : 2; } diff --git a/library/cpp/getopt/small/ygetopt.cpp b/library/cpp/getopt/small/ygetopt.cpp index 1f52827f74..78c3f9fe6d 100644 --- a/library/cpp/getopt/small/ygetopt.cpp +++ b/library/cpp/getopt/small/ygetopt.cpp @@ -36,7 +36,7 @@ public: } ArgsPtrs_.Get()[Args_.size()] = nullptr; - Opt_.Reset(new Opt((int)Args_.size(), ArgsPtrs_.Get(), Format_.data())); + Opt_.Reset(new Opt((int)Args_.size(), ArgsPtrs_.Get(), Format_.data())); } inline ~TIterImpl() = default; diff --git a/library/cpp/getopt/ut/last_getopt_ut.cpp b/library/cpp/getopt/ut/last_getopt_ut.cpp index c99a1d053d..8b6bd4221e 100644 --- a/library/cpp/getopt/ut/last_getopt_ut.cpp +++ b/library/cpp/getopt/ut/last_getopt_ut.cpp @@ -6,7 +6,7 @@ #include <util/generic/array_size.h> #include <util/string/subst.h> #include <util/string/vector.h> -#include <util/string/split.h> +#include <util/string/split.h> using namespace NLastGetopt; @@ -25,7 +25,7 @@ namespace { TOptsParseResultTestWrapper(const TOpts* opts, TVector<const char*> argv) : Argv_(argv) { - Init(opts, (int)Argv_.size(), Argv_.data()); + Init(opts, (int)Argv_.size(), Argv_.data()); } }; @@ -40,7 +40,7 @@ struct TOptsParserTester { void Initialize() { if (!Parser_) - Parser_.Reset(new TOptsParser(&Opts_, (int)Argv_.size(), Argv_.data())); + Parser_.Reset(new TOptsParser(&Opts_, (int)Argv_.size(), Argv_.data())); } void Accept() { @@ -684,7 +684,7 @@ Y_UNIT_TEST_SUITE(TLastGetoptTests) { SubstGlobal(printed, TString(colors.OldColor()), ""); } TVector<TString> lines; - StringSplitter(printed).Split('\n').SkipEmpty().Collect(&lines); + StringSplitter(printed).Split('\n').SkipEmpty().Collect(&lines); UNIT_ASSERT(!lines.empty()); TVector<size_t> indents; for (const TString& line : lines) { |