diff options
author | MarcoFalke <falke.marco@gmail.com> | 2021-03-07 14:17:41 +0100 |
---|---|---|
committer | MarcoFalke <falke.marco@gmail.com> | 2021-03-07 14:21:02 +0100 |
commit | 8c049fe9afcb749e0b80bb318641aee87c800bc5 (patch) | |
tree | 71fd283ae867fb472db91f65ce9b600f8e6bce75 /src/qt | |
parent | 8c21562180d25389b450dc90e761ba3fc266a9da (diff) | |
parent | c77de622dd8ef458f73b1a01a34629a7c4f49358 (diff) | |
download | bitcoin-8c049fe9afcb749e0b80bb318641aee87c800bc5.tar.xz |
Merge #19771: net: Replace enum CConnMan::NumConnections with enum class ConnectionDirection
c77de622dd8ef458f73b1a01a34629a7c4f49358 net: Replace enum CConnMan::NumConnections with enum class ConnectionDirection (Luke Dashjr)
Pull request description:
Refactor split out of #17167
ACKs for top commit:
practicalswift:
cr ACK c77de622dd8ef458f73b1a01a34629a7c4f49358: patch looks correct & `enum class` is strictly better
Tree-SHA512: 40a1bf69d8ab2651b04ba6adbab789369a5a1a29a64ba764c3e6aab575b7943ea8dfd6e35b0abf5bcffa10e7265f4b523a93aa899c0fd581a84fc51ae5377b90
Diffstat (limited to 'src/qt')
-rw-r--r-- | src/qt/clientmodel.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/qt/clientmodel.cpp b/src/qt/clientmodel.cpp index 56813b2d19..b244bc94f2 100644 --- a/src/qt/clientmodel.cpp +++ b/src/qt/clientmodel.cpp @@ -71,14 +71,14 @@ ClientModel::~ClientModel() int ClientModel::getNumConnections(unsigned int flags) const { - CConnman::NumConnections connections = CConnman::CONNECTIONS_NONE; + ConnectionDirection connections = ConnectionDirection::None; if(flags == CONNECTIONS_IN) - connections = CConnman::CONNECTIONS_IN; + connections = ConnectionDirection::In; else if (flags == CONNECTIONS_OUT) - connections = CConnman::CONNECTIONS_OUT; + connections = ConnectionDirection::Out; else if (flags == CONNECTIONS_ALL) - connections = CConnman::CONNECTIONS_ALL; + connections = ConnectionDirection::Both; return m_node.getNodeCount(connections); } |