Daniele Bartolini 10 سال پیش
والد
کامیت
25ca821581
2فایلهای تغییر یافته به همراه0 افزوده شده و 22 حذف شده
  1. 0 19
      src/lua/lua_environment.cpp
  2. 0 3
      src/lua/lua_environment.h

+ 0 - 19
src/lua/lua_environment.cpp

@@ -194,25 +194,6 @@ void LuaEnvironment::load_module_constructor(const char* module, const lua_CFunc
 	lua_pop(L, -1);
 }
 
-void LuaEnvironment::load_module_enum(const char* module, const char* name, uint32_t value)
-{
-	// Checks table existance
-	lua_pushstring(L, module);
-	lua_rawget(L, LUA_GLOBALSINDEX);
-	if (!lua_istable(L, -1)) // If not exixts
-	{
-		// Creates table
-		lua_newtable(L);
-		lua_setglobal(L, module);
-	}
-
-	// Adds field to table
-	lua_getglobal(L, module);
-	lua_pushinteger(L, value);
-	lua_setfield(L, -2, name);
-	lua_pop(L, 2);
-}
-
 void LuaEnvironment::call_global(const char* func, uint8_t argc, ...)
 {
 	CE_ASSERT_NOT_NULL(func);

+ 0 - 3
src/lua/lua_environment.h

@@ -38,9 +38,6 @@ struct LuaEnvironment
 	void load_module_function(const char* module, const char* name, const char* value);
 	void load_module_constructor(const char* module, const lua_CFunction func);
 
-	/// Loads the enum with the given @a name and @a value into the table @a module.
-	void load_module_enum(const char* module, const char* name, uint32_t value);
-
 	/// Calls the global function @a func with @a argc argument number.
 	/// Each argument is a pair (type, value).
 	/// Example call: