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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user