From 6ccb5835ff55d85156be91473c598eca9d6cb9a6 Mon Sep 17 00:00:00 2001 From: Elias Fleckenstein Date: Wed, 4 Nov 2020 16:57:41 +0100 Subject: Revert "Make Lint Happy" This reverts commit ad148587dcf5244c2d2011dba339786c765c54c4. --- src/script/lua_api/l_base.h | 39 +++++++++++++++++++-------------------- 1 file changed, 19 insertions(+), 20 deletions(-) (limited to 'src/script/lua_api/l_base.h') diff --git a/src/script/lua_api/l_base.h b/src/script/lua_api/l_base.h index bb806d631..0cbee7756 100644 --- a/src/script/lua_api/l_base.h +++ b/src/script/lua_api/l_base.h @@ -41,44 +41,43 @@ class Server; class Environment; class ServerInventoryManager; -class ModApiBase : protected LuaHelper -{ +class ModApiBase : protected LuaHelper { public: - static ScriptApiBase *getScriptApiBase(lua_State *L); - static Server *getServer(lua_State *L); + static ScriptApiBase* getScriptApiBase(lua_State *L); + static Server* getServer(lua_State *L); static ServerInventoryManager *getServerInventoryMgr(lua_State *L); -#ifndef SERVER - static Client *getClient(lua_State *L); - static Game *getGame(lua_State *L); - static GUIEngine *getGuiEngine(lua_State *L); -#endif // !SERVER + #ifndef SERVER + static Client* getClient(lua_State *L); + static Game* getGame(lua_State *L); + static GUIEngine* getGuiEngine(lua_State *L); + #endif // !SERVER - static IGameDef *getGameDef(lua_State *L); - static Environment *getEnv(lua_State *L); + static IGameDef* getGameDef(lua_State *L); + static Environment* getEnv(lua_State *L); // When we are not loading the mod, this function returns "." - static std::string getCurrentModPath(lua_State *L); + static std::string getCurrentModPath(lua_State *L); // Get an arbitrary subclass of ScriptApiBase // by using dynamic_cast<> on getScriptApiBase() - template static T *getScriptApi(lua_State *L) - { + template + static T* getScriptApi(lua_State *L) { ScriptApiBase *scriptIface = getScriptApiBase(L); - T *scriptIfaceDowncast = dynamic_cast(scriptIface); + T *scriptIfaceDowncast = dynamic_cast(scriptIface); if (!scriptIfaceDowncast) { - throw LuaError("Requested unavailable ScriptApi - core engine " - "bug!"); + throw LuaError("Requested unavailable ScriptApi - core engine bug!"); } return scriptIfaceDowncast; } - static bool registerFunction( - lua_State *L, const char *name, lua_CFunction func, int top); + static bool registerFunction(lua_State *L, + const char* name, + lua_CFunction func, + int top); static int l_deprecated_function(lua_State *L); static void markAliasDeprecated(luaL_Reg *reg); - private: // = { , } static std::unordered_map m_deprecated_wrappers; -- cgit v1.2.3