mirror of
https://github.com/XRPLF/rippled.git
synced 2025-11-28 23:15:52 +00:00
Replace all Application nonces with nonce singleton and refactor hash_value functions
This commit is contained in:
@@ -107,4 +107,14 @@ bool CBase58Data::operator>=(const CBase58Data& b58) const { return CompareTo(b5
|
||||
bool CBase58Data::operator< (const CBase58Data& b58) const { return CompareTo(b58) < 0; }
|
||||
bool CBase58Data::operator> (const CBase58Data& b58) const { return CompareTo(b58) > 0; }
|
||||
|
||||
std::size_t hash_value(const CBase58Data& b58)
|
||||
{
|
||||
std::size_t seed = HashMaps::getInstance ().getNonce <size_t> ()
|
||||
+ (b58.nVersion * 0x9e3779b9);
|
||||
|
||||
boost::hash_combine (seed, b58.vchData);
|
||||
|
||||
return seed;
|
||||
}
|
||||
|
||||
// vim:ts=4
|
||||
|
||||
Reference in New Issue
Block a user