remove unnecessary non-const function, make other function const

This commit is contained in:
Jimmy Kiselak 2015-10-29 00:17:21 -04:00
parent 55207d9767
commit bf45e835fb
2 changed files with 3 additions and 15 deletions

View file

@ -448,9 +448,9 @@ bool CClaimTrie::getQueueRow(int nHeight, std::vector<CValueQueueEntry>& row) co
return db.Read(std::make_pair(QUEUE_ROW, nHeight), row);
}
bool CClaimTrie::getExpirationQueueRow(int nHeight, std::vector<CValueQueueEntry>& row)
bool CClaimTrie::getExpirationQueueRow(int nHeight, std::vector<CValueQueueEntry>& row) const
{
valueQueueType::iterator itQueueRow = dirtyExpirationQueueRows.find(nHeight);
valueQueueType::const_iterator itQueueRow = dirtyExpirationQueueRows.find(nHeight);
if (itQueueRow != dirtyExpirationQueueRows.end())
{
row = itQueueRow->second;
@ -515,17 +515,6 @@ void CClaimTrie::updateSupportQueue(int nHeight, std::vector<CSupportValueQueueE
itQueueRow->second.swap(row);
}
bool CClaimTrie::getSupportNode(std::string name, supportMapNodeType& node)
{
supportMapType::iterator itNode = dirtySupportNodes.find(name);
if (itNode != dirtySupportNodes.end())
{
node = itNode->second;
return true;
}
return db.Read(std::make_pair(SUPPORT, name), node);
}
bool CClaimTrie::getSupportNode(std::string name, supportMapNodeType& node) const
{
supportMapType::const_iterator itNode = dirtySupportNodes.find(name);

View file

@ -232,8 +232,7 @@ public:
bool expirationQueueEmpty() const;
void setExpirationTime(int t);
bool getQueueRow(int nHeight, std::vector<CValueQueueEntry>& row) const;
bool getExpirationQueueRow(int nHeight, std::vector<CValueQueueEntry>& row);
bool getSupportNode(std::string name, supportMapNodeType& node);
bool getExpirationQueueRow(int nHeight, std::vector<CValueQueueEntry>& row) const;
bool getSupportNode(std::string name, supportMapNodeType& node) const;
bool getSupportQueueRow(int nHeight, std::vector<CSupportValueQueueEntry>& row) const;
bool haveClaim(const std::string& name, const uint256& txhash, uint32_t nOut) const;