aboutsummaryrefslogtreecommitdiff
path: root/src/libutil/config.cc
diff options
context:
space:
mode:
authorJohn Ericson <John.Ericson@Obsidian.Systems>2023-02-01 10:02:30 -0500
committerJohn Ericson <John.Ericson@Obsidian.Systems>2023-02-01 10:02:30 -0500
commit43414738a029a0b98f1937ba31501cf492d58003 (patch)
tree599f0381d096997d9ef75c62527d986e4b35bc0f /src/libutil/config.cc
parentb6c98752f6a7c1824945b3aee9d94e0af16046f8 (diff)
parent518da6c6a30881bd0e767a84c8193a198eeed230 (diff)
Merge remote-tracking branch 'upstream/master' into path-info
Diffstat (limited to 'src/libutil/config.cc')
-rw-r--r--src/libutil/config.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/libutil/config.cc b/src/libutil/config.cc
index 9bb412b4f..b349f2d80 100644
--- a/src/libutil/config.cc
+++ b/src/libutil/config.cc
@@ -209,7 +209,7 @@ void BaseSetting<T>::convertToArg(Args & args, const std::string & category)
.description = fmt("Set the `%s` setting.", name),
.category = category,
.labels = {"value"},
- .handler = {[=](std::string s) { overridden = true; set(s); }},
+ .handler = {[this](std::string s) { overridden = true; set(s); }},
});
if (isAppendable())
@@ -218,7 +218,7 @@ void BaseSetting<T>::convertToArg(Args & args, const std::string & category)
.description = fmt("Append to the `%s` setting.", name),
.category = category,
.labels = {"value"},
- .handler = {[=](std::string s) { overridden = true; set(s, true); }},
+ .handler = {[this](std::string s) { overridden = true; set(s, true); }},
});
}
@@ -270,13 +270,13 @@ template<> void BaseSetting<bool>::convertToArg(Args & args, const std::string &
.longName = name,
.description = fmt("Enable the `%s` setting.", name),
.category = category,
- .handler = {[=]() { override(true); }}
+ .handler = {[this]() { override(true); }}
});
args.addFlag({
.longName = "no-" + name,
.description = fmt("Disable the `%s` setting.", name),
.category = category,
- .handler = {[=]() { override(false); }}
+ .handler = {[this]() { override(false); }}
});
}