forked from blue/lmdbal
a bug fix, reorganization and 0.5.1
This commit is contained in:
parent
6b348023bb
commit
0079f6e96e
22 changed files with 37 additions and 31 deletions
|
@ -841,27 +841,23 @@ void LMDBAL::Cache<K, V>::handleTransactionEntry(const Entry& entry) {
|
|||
std::pair<K, V>* pair = static_cast<std::pair<K, V>*>(entry.second);
|
||||
handleAddRecord(pair->first, pair->second);
|
||||
delete pair;
|
||||
}
|
||||
break;
|
||||
} break;
|
||||
case Operation::remove: {
|
||||
K* key = static_cast<K*>(entry.second);
|
||||
handleRemoveRecord(*key);
|
||||
delete key;
|
||||
}
|
||||
|
||||
break;
|
||||
} break;
|
||||
case Operation::change: {
|
||||
std::pair<K, V>* pair = static_cast<std::pair<K, V>*>(entry.second);
|
||||
handleChangeRecord(pair->first, pair->second);
|
||||
delete pair;
|
||||
}
|
||||
} break;
|
||||
case Operation::force: {
|
||||
std::tuple<bool, K, V>* tuple = static_cast<std::tuple<bool, K, V>*>(entry.second);
|
||||
const std::tuple<bool, K, V>& t = *tuple;
|
||||
handleForceRecord(std::get<1>(t), std::get<2>(t), std::get<0>(t));
|
||||
delete tuple;
|
||||
}
|
||||
break;
|
||||
} break;
|
||||
case Operation::drop:
|
||||
handleDrop();
|
||||
break;
|
||||
|
@ -873,8 +869,7 @@ void LMDBAL::Cache<K, V>::handleTransactionEntry(const Entry& entry) {
|
|||
const std::tuple<bool, SizeType, std::map<K, V>>& t = * tuple;
|
||||
handleAddRecords(std::get<2>(t), std::get<0>(t), std::get<1>(t));
|
||||
delete tuple;
|
||||
}
|
||||
break;
|
||||
} break;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue