1
0
Fork 0
forked from blue/lmdbal

a bug fix, reorganization and 0.5.1

This commit is contained in:
Blue 2023-10-21 16:41:41 -03:00
parent 6b348023bb
commit 0079f6e96e
Signed by untrusted user: blue
GPG key ID: 9B203B252A63EE38
22 changed files with 37 additions and 31 deletions

View file

@ -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;
}
}