mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-12 06:58:57 +01:00
Declare single-argument (non-converting) constructors "explicit"
In order to avoid unintended implicit conversions.
This commit is contained in:
@@ -16,7 +16,7 @@ class FunctionCallback : public Callback
|
||||
F f;
|
||||
|
||||
public:
|
||||
FunctionCallback(F f_) : f(std::move(f_)) {}
|
||||
explicit FunctionCallback(F f_) : f(std::move(f_)) {}
|
||||
~FunctionCallback() override {}
|
||||
void call() override { f(this); }
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user