aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/getopt/small/opt2.cpp
diff options
context:
space:
mode:
authorVlad Yaroslavlev <vladon@vladon.com>2022-02-10 16:46:25 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:46:25 +0300
commit344ea37b4a345701ab0e67de2266a1c1bd7baf2d (patch)
tree1a2c5ffcf89eb53ecd79dbc9bc0a195c27404d0c /library/cpp/getopt/small/opt2.cpp
parent706b83ed7de5a473436620367af31fc0ceecde07 (diff)
downloadydb-344ea37b4a345701ab0e67de2266a1c1bd7baf2d.tar.gz
Restoring authorship annotation for Vlad Yaroslavlev <vladon@vladon.com>. Commit 2 of 2.
Diffstat (limited to 'library/cpp/getopt/small/opt2.cpp')
-rw-r--r--library/cpp/getopt/small/opt2.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/library/cpp/getopt/small/opt2.cpp b/library/cpp/getopt/small/opt2.cpp
index 2816aef7a5..0cdc774e78 100644
--- a/library/cpp/getopt/small/opt2.cpp
+++ b/library/cpp/getopt/small/opt2.cpp
@@ -57,7 +57,7 @@ void Opt2::EatArgv(const char* optspec, const char* long_alias) {
// long_alias has a form "long-name1=A,long-name2=B", etc.
// This implementation is limited to aliasing a single long option
// with single short option (extend it if you really need).
- THashMap<const char*, char> long2short;
+ THashMap<const char*, char> long2short;
long2short["help"] = '?';
long_alias = long_alias ? long_alias : "";
alias_copy = long_alias;
@@ -105,7 +105,7 @@ 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));
+ TString lname(s, eq ? (size_t)(eq - s) : (size_t)strlen(s));
THashMap<const char*, char>::iterator i = long2short.find(lname.data());
if (i == long2short.end()) {
UnknownLongOption = strdup(lname.data()); // free'd in AutoUsage()