Make SHAMapNode::ClassInit self-invoking.

This commit is contained in:
JoelKatz
2012-05-31 13:35:27 -07:00
parent ad9deda4e8
commit 83d8a347ee
5 changed files with 5 additions and 5 deletions

View File

@@ -69,7 +69,9 @@ bool SHAMapNode::operator!=(const uint256 &s) const
return s!=mNodeID;
}
void SHAMapNode::ClassInit()
static bool j = SHAMapNode::ClassInit();
bool SHAMapNode::ClassInit()
{ // set up the depth masks
uint256 selector;
for(int i = 0; i < 64; i += 2)
@@ -80,6 +82,7 @@ void SHAMapNode::ClassInit()
*(selector.begin() + (i / 2)) = 0xFF;
}
smMasks[64] = selector;
return true;
}
uint256 SHAMapNode::getNodeID(int depth, const uint256& hash)