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

Loading…
Cancel
Save