diff options
Diffstat (limited to 'src/script/common')
-rw-r--r-- | src/script/common/c_content.cpp | 16 | ||||
-rw-r--r-- | src/script/common/c_converter.h | 4 |
2 files changed, 10 insertions, 10 deletions
diff --git a/src/script/common/c_content.cpp b/src/script/common/c_content.cpp index c0e29abf0..9be9d7717 100644 --- a/src/script/common/c_content.cpp +++ b/src/script/common/c_content.cpp @@ -132,7 +132,7 @@ void push_item_definition(lua_State *L, const ItemDefinition &i) void push_item_definition_full(lua_State *L, const ItemDefinition &i) { std::string type(es_ItemType[(int)i.type].str); - + lua_newtable(L); lua_pushstring(L, i.name.c_str()); lua_setfield(L, -2, "name"); @@ -721,9 +721,9 @@ void push_content_features(lua_State *L, const ContentFeatures &c) std::string paramtype2(ScriptApiNode::es_ContentParamType2[(int)c.param_type_2].str); std::string drawtype(ScriptApiNode::es_DrawType[(int)c.drawtype].str); std::string liquid_type(ScriptApiNode::es_LiquidType[(int)c.liquid_type].str); - + /* Missing "tiles" because I don't see a usecase (at least not yet). */ - + lua_newtable(L); lua_pushboolean(L, c.has_on_construct); lua_setfield(L, -2, "has_on_construct"); @@ -756,10 +756,10 @@ void push_content_features(lua_State *L, const ContentFeatures &c) if (!c.palette_name.empty()) { push_ARGB8(L, c.color); lua_setfield(L, -2, "color"); - + lua_pushstring(L, c.palette_name.c_str()); lua_setfield(L, -2, "palette_name"); - + push_palette(L, c.palette); lua_setfield(L, -2, "palette"); } @@ -767,7 +767,7 @@ void push_content_features(lua_State *L, const ContentFeatures &c) lua_setfield(L, -2, "waving"); lua_pushnumber(L, c.connect_sides); lua_setfield(L, -2, "connect_sides"); - + lua_newtable(L); u16 i = 1; for (std::vector<std::string>::const_iterator it = c.connects_to.begin(); @@ -776,7 +776,7 @@ void push_content_features(lua_State *L, const ContentFeatures &c) lua_rawseti(L, -2, i); } lua_setfield(L, -2, "connects_to"); - + push_ARGB8(L, c.post_effect_color); lua_setfield(L, -2, "post_effect_color"); lua_pushnumber(L, c.leveled); @@ -1171,7 +1171,7 @@ void push_tool_capabilities(lua_State *L, const ToolGroupCap &groupcap = i->second; // Create subtable "times" lua_newtable(L); - for (UNORDERED_MAP<int, float>::const_iterator + for (std::unordered_map<int, float>::const_iterator i = groupcap.times.begin(); i != groupcap.times.end(); ++i) { lua_pushinteger(L, i->first); lua_pushnumber(L, i->second); diff --git a/src/script/common/c_converter.h b/src/script/common/c_converter.h index b0f61a8ca..f7d9294d6 100644 --- a/src/script/common/c_converter.h +++ b/src/script/common/c_converter.h @@ -28,7 +28,7 @@ with this program; if not, write to the Free Software Foundation, Inc., #define C_CONVERTER_H_ #include <vector> -#include "util/cpp11_container.h" +#include <unordered_map> #include "irrlichttypes_bloated.h" #include "common/c_types.h" @@ -60,7 +60,7 @@ bool getintfield(lua_State *L, int table, bool getintfield(lua_State *L, int table, const char *fieldname, u32 &result); void read_groups(lua_State *L, int index, - UNORDERED_MAP<std::string, int> &result); + std::unordered_map<std::string, int> &result); bool getboolfield(lua_State *L, int table, const char *fieldname, bool &result); bool getfloatfield(lua_State *L, int table, |