aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/getopt/small
diff options
context:
space:
mode:
authordanlark <danlark@yandex-team.ru>2022-02-10 16:46:10 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:46:10 +0300
commitbaa58daefa91fde4b4769facdbd2903763b9c6a8 (patch)
tree1a2c5ffcf89eb53ecd79dbc9bc0a195c27404d0c /library/cpp/getopt/small
parent3426a9bc7f169ae9da54cef557ad2a33f6e8eee0 (diff)
downloadydb-baa58daefa91fde4b4769facdbd2903763b9c6a8.tar.gz
Restoring authorship annotation for <danlark@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'library/cpp/getopt/small')
-rw-r--r--library/cpp/getopt/small/last_getopt.h2
-rw-r--r--library/cpp/getopt/small/last_getopt_opts.cpp4
-rw-r--r--library/cpp/getopt/small/opt2.cpp8
-rw-r--r--library/cpp/getopt/small/ygetopt.cpp2
4 files changed, 8 insertions, 8 deletions
diff --git a/library/cpp/getopt/small/last_getopt.h b/library/cpp/getopt/small/last_getopt.h
index dc795741c4..07687bc914 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 27a3dee5b2..03c432849f 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 f53d8c132d..0cdc774e78 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 78c3f9fe6d..1f52827f74 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;