aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorlo-r-d <lo-r-d@yandex-team.ru>2022-02-10 16:50:54 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:50:54 +0300
commitdb43368da1171b57f434d86bbea4327fd0113715 (patch)
treeabbadb058033c8f215b2d4b178606df302685e8c
parent74f28e6c6fad7c4b75d97dcc239d29df04e525cb (diff)
downloadydb-db43368da1171b57f434d86bbea4327fd0113715.tar.gz
Restoring authorship annotation for <lo-r-d@yandex-team.ru>. Commit 1 of 2.
-rw-r--r--library/cpp/getopt/small/last_getopt_opt.h34
1 files changed, 17 insertions, 17 deletions
diff --git a/library/cpp/getopt/small/last_getopt_opt.h b/library/cpp/getopt/small/last_getopt_opt.h
index a8dd5adca9..e78678d178 100644
--- a/library/cpp/getopt/small/last_getopt_opt.h
+++ b/library/cpp/getopt/small/last_getopt_opt.h
@@ -620,18 +620,18 @@ namespace NLastGetopt {
return StoreResultT<T>(target, def);
}
- template <typename T>
- TOpt& StoreResultDef(T* target) {
- DefaultValue_ = ToString(*target);
- return StoreResultT<T>(target, *target);
- }
-
- template <typename T, typename TpDef>
- TOpt& StoreResultDef(T* target, const TpDef& def) {
- DefaultValue_ = ToString(def);
- return StoreResultT<T>(target, def);
- }
-
+ template <typename T>
+ TOpt& StoreResultDef(T* target) {
+ DefaultValue_ = ToString(*target);
+ return StoreResultT<T>(target, *target);
+ }
+
+ template <typename T, typename TpDef>
+ TOpt& StoreResultDef(T* target, const TpDef& def) {
+ DefaultValue_ = ToString(def);
+ return StoreResultT<T>(target, def);
+ }
+
// Sugar for storing flags (option without arguments) to boolean vars
TOpt& SetFlag(bool* target) {
return DefaultValue("0").StoreResult(target, true);
@@ -678,12 +678,12 @@ namespace NLastGetopt {
return Handler1T<T>([target](auto&& value) { target->push_back(std::move(value)); });
}
- // Appends FromString<T>(arg) to *target for each argument
- template <typename T>
- TOpt& InsertTo(THashSet<T>* target) {
+ // Appends FromString<T>(arg) to *target for each argument
+ template <typename T>
+ TOpt& InsertTo(THashSet<T>* target) {
return Handler1T<T>([target](auto&& value) { target->insert(std::move(value)); });
- }
-
+ }
+
// Emplaces TString arg to *target for each argument
template <typename T>
TOpt& EmplaceTo(TVector<T>* target) {