aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp
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
commit78c0028dbb79b03bcb0d700133245433b0dac3d1 (patch)
tree5d5cb817648f650d76cf1076100726fd9b8448e8 /library/cpp
parentdb43368da1171b57f434d86bbea4327fd0113715 (diff)
downloadydb-78c0028dbb79b03bcb0d700133245433b0dac3d1.tar.gz
Restoring authorship annotation for <lo-r-d@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'library/cpp')
-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 e78678d178..a8dd5adca9 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) {