mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
Annonate another instance of the same anonymous constant
This commit is contained in:
@@ -109,8 +109,16 @@ bool CBase58Data::operator> (const CBase58Data& b58) const { return CompareTo(b5
|
||||
|
||||
std::size_t hash_value(const CBase58Data& b58)
|
||||
{
|
||||
// VFALCO: TODO, figure out what this is for and whether or
|
||||
// not it affects the protocol specification.
|
||||
//
|
||||
// NOTE, this constant is used elsewhere as well.
|
||||
// should it be DRY?
|
||||
//
|
||||
const std::size_t mysteriousConstant = 0x9e3779b9;
|
||||
|
||||
std::size_t seed = HashMaps::getInstance ().getNonce <size_t> ()
|
||||
+ (b58.nVersion * 0x9e3779b9);
|
||||
+ (b58.nVersion * mysteriousConstant);
|
||||
|
||||
boost::hash_combine (seed, b58.vchData);
|
||||
|
||||
|
||||
@@ -29,6 +29,9 @@ void SHAMapNode::setMHash() const
|
||||
// VFALCO: TODO, figure out what this is for and whether or
|
||||
// not it affects the protocol specification.
|
||||
//
|
||||
// NOTE, this constant is used elsewhere as well.
|
||||
// should it be DRY?
|
||||
//
|
||||
const std::size_t mysteriousConstant = 0x9e3779b9;
|
||||
|
||||
std::size_t h = HashMaps::getInstance ().getNonce <std::size_t> ()
|
||||
|
||||
Reference in New Issue
Block a user