Swap out std::map<> for Hashtable<> for main peer database in Topology. (ongoing std::map-ectomy)
This commit is contained in:
parent
cfd101c9b8
commit
3a959a7763
5 changed files with 37 additions and 20 deletions
|
@ -166,6 +166,15 @@ public:
|
|||
return _a;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Hash code for use with Hashtable
|
||||
*/
|
||||
inline unsigned long hashCode() const
|
||||
throw()
|
||||
{
|
||||
return (unsigned long)_a;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Hexadecimal string
|
||||
*/
|
||||
|
@ -197,11 +206,11 @@ public:
|
|||
|
||||
/**
|
||||
* Check if this address is reserved
|
||||
*
|
||||
*
|
||||
* The all-zero null address and any address beginning with 0xff are
|
||||
* reserved. (0xff is reserved for future use to designate possibly
|
||||
* longer addresses, addresses based on IPv6 innards, etc.)
|
||||
*
|
||||
*
|
||||
* @return True if address is reserved and may not be used
|
||||
*/
|
||||
inline bool isReserved() const
|
||||
|
@ -230,4 +239,3 @@ private:
|
|||
} // namespace ZeroTier
|
||||
|
||||
#endif
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue