Skip to content

Commit

Permalink
Remove SettingHandler constructors and bool conversion
Browse files Browse the repository at this point in the history
`fun` has a default value, so we no longer need to be able to convert
`SettingHandler` to `bool`.
  • Loading branch information
9999years committed Feb 9, 2024
1 parent 2213b3d commit 1203308
Showing 1 changed file with 0 additions and 14 deletions.
14 changes: 0 additions & 14 deletions src/libutil/config.hh
Original file line number Diff line number Diff line change
Expand Up @@ -223,20 +223,6 @@ template<typename T>
struct SettingHandler
{
std::function<void(T &)> fun = [](T & val) {};

SettingHandler() = default;

SettingHandler(std::function<void(T &)> && fun)
: fun(std::move(fun))
{ }

operator bool() const {
if (fun) {
return true;
} else {
return false;
}
}
};

/**
Expand Down

0 comments on commit 1203308

Please sign in to comment.