Browse Source

Fixed CDbKeyIterator constructor warning.

Removed incorrect items from the results of keva_filter.
cn
Jianping Wu 6 years ago
parent
commit
316b951bd2
  1. 6
      src/txdb.cpp

6
src/txdb.cpp

@ -113,7 +113,7 @@ CDbKeyIterator::~CDbKeyIterator() { @@ -113,7 +113,7 @@ CDbKeyIterator::~CDbKeyIterator() {
}
CDbKeyIterator::CDbKeyIterator(const CDBWrapper& db, const valtype& ns)
: iter(const_cast<CDBWrapper*>(&db)->NewIterator()), CKevaIterator(ns)
: CKevaIterator(ns), iter(const_cast<CDBWrapper*>(&db)->NewIterator())
{
seek(valtype());
}
@ -130,6 +130,10 @@ bool CDbKeyIterator::next(valtype& key, CKevaData& data) { @@ -130,6 +130,10 @@ bool CDbKeyIterator::next(valtype& key, CKevaData& data) {
if (!iter->GetKey(curKey) || curKey.first != DB_NAME)
return false;
valtype curNameSpace = std::get<0>(curKey.second);
if (curNameSpace != nameSpace) {
return false;
}
key = std::get<1>(curKey.second);
if (!iter->GetValue(data)) {

Loading…
Cancel
Save