aboutsummaryrefslogtreecommitdiff
path: root/src/script
diff options
context:
space:
mode:
authorkwolekr <kwolekr@minetest.net>2015-10-04 02:50:04 -0400
committerkwolekr <kwolekr@minetest.net>2015-10-04 04:00:16 -0400
commitf0cd5da687ca216b4bdd9abe7bc8038a679d3763 (patch)
tree329909b22c4494a2df2249c5697acb961b0fc527 /src/script
parentb12bdcce348323247811b9a0299e2e9294991d13 (diff)
downloadminetest-f0cd5da687ca216b4bdd9abe7bc8038a679d3763.tar.gz
minetest-f0cd5da687ca216b4bdd9abe7bc8038a679d3763.tar.bz2
minetest-f0cd5da687ca216b4bdd9abe7bc8038a679d3763.zip
Define and use limit constants for Irrlicht fixed-width types
Diffstat (limited to 'src/script')
-rw-r--r--src/script/lua_api/l_mapgen.cpp2
-rw-r--r--src/script/lua_api/l_object.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/script/lua_api/l_mapgen.cpp b/src/script/lua_api/l_mapgen.cpp
index 784ceabcc..44af7892f 100644
--- a/src/script/lua_api/l_mapgen.cpp
+++ b/src/script/lua_api/l_mapgen.cpp
@@ -604,7 +604,7 @@ int ModApiMapgen::l_get_mapgen_params(lua_State *L)
lua_pushinteger(L, params->chunksize);
lua_setfield(L, -2, "chunksize");
- std::string flagstr = writeFlagString(params->flags, flagdesc_mapgen, (u32)-1);
+ std::string flagstr = writeFlagString(params->flags, flagdesc_mapgen, U32_MAX);
lua_pushstring(L, flagstr.c_str());
lua_setfield(L, -2, "flags");
diff --git a/src/script/lua_api/l_object.cpp b/src/script/lua_api/l_object.cpp
index 3ac8eeefb..2bd5299dc 100644
--- a/src/script/lua_api/l_object.cpp
+++ b/src/script/lua_api/l_object.cpp
@@ -1187,7 +1187,7 @@ int ObjectRef::l_hud_add(lua_State *L)
}
u32 id = getServer(L)->hudAdd(player, elem);
- if (id == (u32)-1) {
+ if (id == U32_MAX) {
delete elem;
return 0;
}