Fix base_uint ctor to disambiguate void const*

This commit is contained in:
Vinnie Falco
2013-07-25 11:43:24 -07:00
parent 492e61649b
commit 8b342d9859
6 changed files with 21 additions and 7 deletions

View File

@@ -176,7 +176,7 @@ public:
else
{
// Uh oh, corrupted data!
WriteLog (lsFATAL, NodeObject) << "Corrupt NodeObject #" << uint256 (it->key ().data ());
WriteLog (lsFATAL, NodeObject) << "Corrupt NodeObject #" << uint256::fromVoid (it->key ().data ());
}
}
else

View File

@@ -28,7 +28,7 @@ public:
Status fetch (void const* key, NodeObject::Ptr* pObject)
{
uint256 const hash (key);
uint256 const hash (uint256::fromVoid (key));
Map::iterator iter = m_map.find (hash);

View File

@@ -71,7 +71,7 @@ NodeObject::Ptr NodeStore::DecodedBlob::createObject ()
memcpy (data.data (), m_objectData, m_dataBytes);
object = NodeObject::createObject (
m_objectType, m_ledgerIndex, data, uint256 (m_key));
m_objectType, m_ledgerIndex, data, uint256::fromVoid (m_key));
}
return object;

View File

@@ -66,7 +66,7 @@ public:
{
ScopedLock sl (m_db->getDBLock());
uint256 const hash (key);
uint256 const hash (uint256::fromVoid (key));
static SqliteStatement pSt (m_db->getDB()->getSqliteDB(),
"SELECT ObjType,LedgerIndex,Object FROM CommittedObjects WHERE Hash = ?;");