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/small/opt2.cpp | |
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/small/opt2.cpp')
-rw-r--r-- | library/cpp/getopt/small/opt2.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
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; } |