Codechange: Swap SocketList map key/value around.

This map is used store socket and address together, and, other than
checking that the address does not already have a socket, the data layout
does not seem particularly important.

However, as address is the key, technically it should not be modified,
and address may self-modify itself during comparisons.
This commit is contained in:
Peter Nelson
2023-05-16 23:53:33 +01:00
committed by PeterN
parent f454ec8d63
commit 72018badff
4 changed files with 12 additions and 12 deletions

View File

@@ -19,7 +19,7 @@
class NetworkAddress;
typedef std::vector<NetworkAddress> NetworkAddressList; ///< Type for a list of addresses.
typedef SmallMap<NetworkAddress, SOCKET> SocketList; ///< Type for a mapping between address and socket.
typedef SmallMap<SOCKET, NetworkAddress> SocketList; ///< Type for a mapping between address and socket.
/**
* Wrapper for (un)resolved network addresses; there's no reason to transform