summaryrefslogtreecommitdiff
path: root/src/main.cpp
diff options
context:
space:
mode:
authorLoic Blot <loic.blot@unix-experience.fr>2016-05-14 12:23:15 +0200
committerLoic Blot <loic.blot@unix-experience.fr>2016-05-17 06:52:16 +0200
commit143401451c457da5079b2970fe260acea45bd85a (patch)
tree390c729ba28f974bf422d441dfd8dd7e817e4127 /src/main.cpp
parentdecbd396df0855f0a356c836cf7c0c5b133964cf (diff)
downloadminetest-143401451c457da5079b2970fe260acea45bd85a.tar.gz
minetest-143401451c457da5079b2970fe260acea45bd85a.tar.bz2
minetest-143401451c457da5079b2970fe260acea45bd85a.zip
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
Diffstat (limited to 'src/main.cpp')
-rw-r--r--src/main.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/main.cpp b/src/main.cpp
index 1b95a9f1c..f63b6a986 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -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 {