Swap out std::map<> for Hashtable<> for main peer database in Topology. (ongoing std::map-ectomy)

This commit is contained in:
Adam Ierymenko 2015-09-04 12:14:21 -07:00
parent cfd101c9b8
commit 3a959a7763
5 changed files with 37 additions and 20 deletions

View file

@ -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