mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
DB::loadBlock copy removal & DB backend cleanup
* Remove the copy from db::loadBlock by using a pointer to the destination * cleanup db backend, the child backend doesn't have to set their functions as virtual
This commit is contained in:
parent
decbd396df
commit
143401451c
11 changed files with 47 additions and 47 deletions
|
@ -948,7 +948,8 @@ static bool migrate_database(const GameParams &game_params, const Settings &cmd_
|
|||
for (std::vector<v3s16>::const_iterator it = blocks.begin(); it != blocks.end(); ++it) {
|
||||
if (kill) return false;
|
||||
|
||||
const std::string &data = old_db->loadBlock(*it);
|
||||
std::string data;
|
||||
old_db->loadBlock(*it, &data);
|
||||
if (!data.empty()) {
|
||||
new_db->saveBlock(*it, data);
|
||||
} else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue