mirror of
https://github.com/azerothcore/mod-ale
synced 2025-11-29 15:38:17 +08:00
Clean-up some unnecessary CHECKVAL templates.
This commit is contained in:
12
LuaEngine.h
12
LuaEngine.h
@@ -20,6 +20,13 @@
|
||||
#include "World.h"
|
||||
#include "HookMgr.h"
|
||||
|
||||
extern "C"
|
||||
{
|
||||
#include "lua.h"
|
||||
#include "lualib.h"
|
||||
#include "lauxlib.h"
|
||||
};
|
||||
|
||||
#ifdef TRINITY
|
||||
struct ItemTemplate;
|
||||
#else
|
||||
@@ -163,7 +170,10 @@ public:
|
||||
|
||||
// Checks
|
||||
template<typename T> static T CHECKVAL(lua_State* L, int narg);
|
||||
template<typename T> static T CHECKVAL(lua_State* L, int narg, T def);
|
||||
template<typename T> static T CHECKVAL(lua_State* L, int narg, T def)
|
||||
{
|
||||
return lua_isnoneornil(L, narg) ? def : CHECKVAL<T>(L, narg);
|
||||
}
|
||||
template<typename T> static T* CHECKOBJ(lua_State* L, int narg, bool error = true)
|
||||
{
|
||||
return ElunaTemplate<T>::check(L, narg, error);
|
||||
|
||||
Reference in New Issue
Block a user