aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLoic Blot <loic.blot@unix-experience.fr>2017-07-27 07:36:46 +0200
committerLoïc Blot <nerzhul@users.noreply.github.com>2017-07-27 07:56:48 +0200
commitba959ce27f20d0887fc94da4e40880749a493cde (patch)
treedc84aa2a48cdbd58f86a1556ade4b78f4241d0f0 /src
parent4eb59aeeb2f2b535f4eb2a1608189bb03098454e (diff)
downloadminetest-ba959ce27f20d0887fc94da4e40880749a493cde.tar.gz
minetest-ba959ce27f20d0887fc94da4e40880749a493cde.tar.bz2
minetest-ba959ce27f20d0887fc94da4e40880749a493cde.zip
Rename previous_was_found to previous_exists
Diffstat (limited to 'src')
-rw-r--r--src/mapblock.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/mapblock.cpp b/src/mapblock.cpp
index d94955a3b..1a94857af 100644
--- a/src/mapblock.cpp
+++ b/src/mapblock.cpp
@@ -502,7 +502,7 @@ static void correctBlockNodeIds(const NameIdMapping *nimap, MapNode *nodes,
std::unordered_set<content_t> unnamed_contents;
std::unordered_set<std::string> unallocatable_contents;
- bool previous_was_found = false;
+ bool previous_exists = false;
content_t previous_local_id = CONTENT_IGNORE;
content_t previous_global_id = CONTENT_IGNORE;
@@ -512,7 +512,7 @@ static void correctBlockNodeIds(const NameIdMapping *nimap, MapNode *nodes,
// apply directly previous resolved id
// This permits to massively improve loading performance when nodes are similar
// example: default:air, default:stone are massively present
- if (previous_was_found && local_id == previous_local_id) {
+ if (previous_exists && local_id == previous_local_id) {
nodes[i].setContent(previous_global_id);
continue;
}
@@ -520,7 +520,7 @@ static void correctBlockNodeIds(const NameIdMapping *nimap, MapNode *nodes,
std::string name;
if (!nimap->getName(local_id, name)) {
unnamed_contents.insert(local_id);
- previous_was_found = false;
+ previous_exists = false;
continue;
}
@@ -529,7 +529,7 @@ static void correctBlockNodeIds(const NameIdMapping *nimap, MapNode *nodes,
global_id = gamedef->allocateUnknownNodeId(name);
if (global_id == CONTENT_IGNORE) {
unallocatable_contents.insert(name);
- previous_was_found = false;
+ previous_exists = false;
continue;
}
}
@@ -538,7 +538,7 @@ static void correctBlockNodeIds(const NameIdMapping *nimap, MapNode *nodes,
// Save previous node local_id & global_id result
previous_local_id = local_id;
previous_global_id = global_id;
- previous_was_found = true;
+ previous_exists = true;
}
for (const content_t c: unnamed_contents) {