summaryrefslogtreecommitdiff
path: root/src/content_nodemeta.cpp
diff options
context:
space:
mode:
authorest31 <MTest31@outlook.com>2015-09-18 13:45:42 +0200
committerest31 <MTest31@outlook.com>2015-09-19 20:57:29 +0200
commit452df1c723722183ebf3a332f7bcc355be5b2998 (patch)
treecfba8eaa11c7bdc1d6c245bfa85c973597bccc3c /src/content_nodemeta.cpp
parent9c635f28ac2b103bf7196e47947bf64673c13393 (diff)
downloadminetest-452df1c723722183ebf3a332f7bcc355be5b2998.tar.gz
minetest-452df1c723722183ebf3a332f7bcc355be5b2998.tar.bz2
minetest-452df1c723722183ebf3a332f7bcc355be5b2998.zip
Various style cleanups + unused code removal
-> Don't pass pointer to whole IGameDef to NodeMetadata constructors and deserializers, but only to IItemDefManager, which is needed -> Remove the unused content_mapnode_get_new_name() method -> Fix style for MapBlock::deSerialize and MapBlock::deSerialize_pre22, improving accuracy of error messages a bit -> Fix style at other serialisation methods too -> Improve accuracy of some comments
Diffstat (limited to 'src/content_nodemeta.cpp')
-rw-r--r--src/content_nodemeta.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/content_nodemeta.cpp b/src/content_nodemeta.cpp
index f504924f9..dd5f8e6b5 100644
--- a/src/content_nodemeta.cpp
+++ b/src/content_nodemeta.cpp
@@ -79,7 +79,7 @@ static bool content_nodemeta_deserialize_legacy_body(
inv->getList("0")->setName("main");
}
assert(inv->getList("main") && !inv->getList("0"));
-
+
meta->setString("formspec","size[8,9]"
"list[current_name;main;0,0;8,4;]"
"list[current_player;main;0,5;8,4;]");
@@ -96,7 +96,7 @@ static bool content_nodemeta_deserialize_legacy_body(
inv->getList("0")->setName("main");
}
assert(inv->getList("main") && !inv->getList("0"));
-
+
meta->setString("formspec","size[8,9]"
"list[current_name;main;0,0;8,4;]"
"list[current_player;main;0,5;8,4;]");
@@ -145,7 +145,7 @@ static bool content_nodemeta_deserialize_legacy_meta(
void content_nodemeta_deserialize_legacy(std::istream &is,
NodeMetadataList *meta, NodeTimerList *timers,
- IGameDef *gamedef)
+ IItemDefManager *item_def_mgr)
{
meta->clear();
timers->clear();
@@ -181,7 +181,7 @@ void content_nodemeta_deserialize_legacy(std::istream &is,
continue;
}
- NodeMetadata *data = new NodeMetadata(gamedef);
+ NodeMetadata *data = new NodeMetadata(item_def_mgr);
bool need_timer = content_nodemeta_deserialize_legacy_meta(is, data);
meta->set(p, data);