From 73f71e19965e07534eb47701f2b23c9ed59ef475 Mon Sep 17 00:00:00 2001 From: Hennadii Stepanov <32963518+hebasto@users.noreply.github.com> Date: Sat, 19 Sep 2020 11:52:27 +0300 Subject: refactor: Use explicit function type instead of template --- src/net.h | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/net.h b/src/net.h index 60c3dc6aef..b0294d5b15 100644 --- a/src/net.h +++ b/src/net.h @@ -258,8 +258,8 @@ public: void PushMessage(CNode* pnode, CSerializedNetMsg&& msg); - template - void ForEachNode(Callable&& func) + using NodeFn = std::function; + void ForEachNode(const NodeFn& func) { LOCK(cs_vNodes); for (auto&& node : vNodes) { @@ -268,8 +268,7 @@ public: } }; - template - void ForEachNode(Callable&& func) const + void ForEachNode(const NodeFn& func) const { LOCK(cs_vNodes); for (auto&& node : vNodes) { -- cgit v1.2.3