1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-06-27 16:36:03 +00:00

Define and use limit constants for Irrlicht fixed-width types

This commit is contained in:
kwolekr 2015-10-04 02:50:04 -04:00
parent b12bdcce34
commit f0cd5da687
11 changed files with 31 additions and 16 deletions

View file

@ -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");

View file

@ -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;
}