summaryrefslogtreecommitdiff
path: root/src/scripting/luautil.hpp
diff options
context:
space:
mode:
authorPhilipp Sehmisch <crush@themanaworld.org>2009-08-25 03:31:01 +0200
committerPhilipp Sehmisch <crush@themanaworld.org>2009-08-25 03:31:01 +0200
commit0e854932c635ac77103ffda6ad967f6ec172b0e8 (patch)
tree0d18cedc8b6faf3a1ca46a70677b1df7b9448ce5 /src/scripting/luautil.hpp
parent936c2d31127871e86918cf4e735da75186582543 (diff)
downloadmanaserv-0e854932c635ac77103ffda6ad967f6ec172b0e8.tar.gz
manaserv-0e854932c635ac77103ffda6ad967f6ec172b0e8.tar.bz2
manaserv-0e854932c635ac77103ffda6ad967f6ec172b0e8.tar.xz
manaserv-0e854932c635ac77103ffda6ad967f6ec172b0e8.zip
Made the STL container -> LUA table wrappers more flexible.
Diffstat (limited to 'src/scripting/luautil.hpp')
-rw-r--r--src/scripting/luautil.hpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/scripting/luautil.hpp b/src/scripting/luautil.hpp
index 79623ab9..900f243f 100644
--- a/src/scripting/luautil.hpp
+++ b/src/scripting/luautil.hpp
@@ -80,7 +80,7 @@ template <typename T> void pushSTLContainer(lua_State *s, const std::vector<T> &
for (int key = 0; key < len; key++)
{
push(s, key+1);
- push(s, container.at(key).c_str());
+ push(s, container.at(key));
lua_settable(s, table);
}
}
@@ -96,8 +96,8 @@ template <typename Tkey, typename Tval> void pushSTLContainer(lua_State *s, cons
for (int key = 1; key <= len; key++)
{
- push(s, i->first.c_str());
- push(s, i->second.c_str());
+ push(s, i->first);
+ push(s, i->second);
lua_settable(s, table);
i++;
}