aboutsummaryrefslogtreecommitdiff
path: root/src/script
diff options
context:
space:
mode:
Diffstat (limited to 'src/script')
-rw-r--r--src/script/common/c_content.cpp16
-rw-r--r--src/script/common/c_converter.h4
-rw-r--r--src/script/lua_api/l_mapgen.cpp8
-rw-r--r--src/script/lua_api/l_object.cpp4
-rw-r--r--src/script/lua_api/l_util.cpp2
5 files changed, 17 insertions, 17 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,
diff --git a/src/script/lua_api/l_mapgen.cpp b/src/script/lua_api/l_mapgen.cpp
index 32eb7af84..454e8f719 100644
--- a/src/script/lua_api/l_mapgen.cpp
+++ b/src/script/lua_api/l_mapgen.cpp
@@ -100,7 +100,7 @@ Biome *get_or_load_biome(lua_State *L, int index,
BiomeManager *biomemgr);
Biome *read_biome_def(lua_State *L, int index, INodeDefManager *ndef);
size_t get_biome_list(lua_State *L, int index,
- BiomeManager *biomemgr, UNORDERED_SET<u8> *biome_id_list);
+ BiomeManager *biomemgr, std::unordered_set<u8> *biome_id_list);
Schematic *get_or_load_schematic(lua_State *L, int index,
SchematicManager *schemmgr, StringMap *replace_names);
@@ -244,7 +244,7 @@ bool read_schematic_def(lua_State *L, int index,
schem->schemdata = new MapNode[numnodes];
size_t names_base = names->size();
- UNORDERED_MAP<std::string, content_t> name_id_map;
+ std::unordered_map<std::string, content_t> name_id_map;
u32 i = 0;
for (lua_pushnil(L); lua_next(L, -2); i++, lua_pop(L, 1)) {
@@ -266,7 +266,7 @@ bool read_schematic_def(lua_State *L, int index,
u8 param2 = getintfield_default(L, -1, "param2", 0);
//// Find or add new nodename-to-ID mapping
- UNORDERED_MAP<std::string, content_t>::iterator it = name_id_map.find(name);
+ std::unordered_map<std::string, content_t>::iterator it = name_id_map.find(name);
content_t name_index;
if (it != name_id_map.end()) {
name_index = it->second;
@@ -409,7 +409,7 @@ Biome *read_biome_def(lua_State *L, int index, INodeDefManager *ndef)
size_t get_biome_list(lua_State *L, int index,
- BiomeManager *biomemgr, UNORDERED_SET<u8> *biome_id_list)
+ BiomeManager *biomemgr, std::unordered_set<u8> *biome_id_list)
{
if (index < 0)
index = lua_gettop(L) + 1 + index;
diff --git a/src/script/lua_api/l_object.cpp b/src/script/lua_api/l_object.cpp
index aaab0d98e..d37c525dd 100644
--- a/src/script/lua_api/l_object.cpp
+++ b/src/script/lua_api/l_object.cpp
@@ -137,8 +137,8 @@ int ObjectRef::l_remove(lua_State *L)
if (co->getType() == ACTIVEOBJECT_TYPE_PLAYER)
return 0;
- const UNORDERED_SET<int> &child_ids = co->getAttachmentChildIds();
- UNORDERED_SET<int>::const_iterator it;
+ const std::unordered_set<int> &child_ids = co->getAttachmentChildIds();
+ std::unordered_set<int>::const_iterator it;
for (it = child_ids.begin(); it != child_ids.end(); ++it) {
// Child can be NULL if it was deleted earlier
if (ServerActiveObject *child = env->getActiveObject(*it))
diff --git a/src/script/lua_api/l_util.cpp b/src/script/lua_api/l_util.cpp
index c4a988e07..3cf19f024 100644
--- a/src/script/lua_api/l_util.cpp
+++ b/src/script/lua_api/l_util.cpp
@@ -174,7 +174,7 @@ int ModApiUtil::l_get_dig_params(lua_State *L)
int ModApiUtil::l_get_hit_params(lua_State *L)
{
NO_MAP_LOCK_REQUIRED;
- UNORDERED_MAP<std::string, int> groups;
+ std::unordered_map<std::string, int> groups;
read_groups(L, 1, groups);
ToolCapabilities tp = read_tool_capabilities(L, 2);
if(lua_isnoneornil(L, 3))