mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-02-08 10:31:50 -05:00
refactor: Use explicit function type instead of template
This commit is contained in:
parent
c30f79d418
commit
73f71e1996
1 changed files with 3 additions and 4 deletions
|
@ -258,8 +258,8 @@ public:
|
|||
|
||||
void PushMessage(CNode* pnode, CSerializedNetMsg&& msg);
|
||||
|
||||
template<typename Callable>
|
||||
void ForEachNode(Callable&& func)
|
||||
using NodeFn = std::function<void(CNode*)>;
|
||||
void ForEachNode(const NodeFn& func)
|
||||
{
|
||||
LOCK(cs_vNodes);
|
||||
for (auto&& node : vNodes) {
|
||||
|
@ -268,8 +268,7 @@ public:
|
|||
}
|
||||
};
|
||||
|
||||
template<typename Callable>
|
||||
void ForEachNode(Callable&& func) const
|
||||
void ForEachNode(const NodeFn& func) const
|
||||
{
|
||||
LOCK(cs_vNodes);
|
||||
for (auto&& node : vNodes) {
|
||||
|
|
Loading…
Add table
Reference in a new issue