net: Replace enum CConnMan::NumConnections with enum class ConnectionDirection

This commit is contained in:
Luke Dashjr
2019-10-16 17:37:19 +00:00
parent b4d22654fe
commit c77de622dd
9 changed files with 36 additions and 24 deletions

View File

@@ -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);
}