aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorkwolekr <kwolekr@minetest.net>2013-07-06 15:03:34 -0400
committerkwolekr <kwolekr@minetest.net>2013-07-06 15:03:54 -0400
commit55ecde665d62d3de152c17fa9b463735bee7d0a9 (patch)
tree9f673023af6db86194bbcd489d423e8e1b5d60e2 /src
parent307c57dcc494161d019d7ee394e7cdb1912ca11f (diff)
downloadminetest-55ecde665d62d3de152c17fa9b463735bee7d0a9.tar.gz
minetest-55ecde665d62d3de152c17fa9b463735bee7d0a9.tar.bz2
minetest-55ecde665d62d3de152c17fa9b463735bee7d0a9.zip
Decoration: Remove usage of multi-character constants
Diffstat (limited to 'src')
-rw-r--r--src/mapgen.cpp4
-rw-r--r--src/mapgen.h2
2 files changed, 4 insertions, 2 deletions
diff --git a/src/mapgen.cpp b/src/mapgen.cpp
index 94d1a6310..fe1cfb3a4 100644
--- a/src/mapgen.cpp
+++ b/src/mapgen.cpp
@@ -660,7 +660,7 @@ bool DecoSchematic::loadSchematicFile() {
std::ifstream is(filename.c_str(), std::ios_base::binary);
u32 signature = readU32(is);
- if (signature != 'MTSM') {
+ if (signature != MTSCHEM_FILE_SIGNATURE) {
errorstream << "loadSchematicFile: invalid schematic "
"file" << std::endl;
return false;
@@ -719,7 +719,7 @@ bool DecoSchematic::loadSchematicFile() {
void DecoSchematic::saveSchematicFile(INodeDefManager *ndef) {
std::ofstream os(filename.c_str(), std::ios_base::binary);
- writeU32(os, 'MTSM'); // signature
+ writeU32(os, MTSCHEM_FILE_SIGNATURE); // signature
writeU16(os, 1); // version
writeV3S16(os, size); // schematic size
diff --git a/src/mapgen.h b/src/mapgen.h
index 7229e8996..2287445ee 100644
--- a/src/mapgen.h
+++ b/src/mapgen.h
@@ -260,6 +260,8 @@ public:
virtual std::string getName();
};
+#define MTSCHEM_FILE_SIGNATURE 0x4d54534d // 'MTSM'
+
enum Rotation {
ROTATE_0,
ROTATE_90,