From 6e678901528ea2557673cdc50d5e46dda6106749 Mon Sep 17 00:00:00 2001 From: Mm2PL Date: Mon, 13 Feb 2023 00:13:53 +0100 Subject: [PATCH] Thank you clang-format for at least having a diff --- src/controllers/plugins/LuaAPI.cpp | 6 +++--- src/controllers/plugins/PluginController.cpp | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/controllers/plugins/LuaAPI.cpp b/src/controllers/plugins/LuaAPI.cpp index 0abe7c59e..b6ba100db 100644 --- a/src/controllers/plugins/LuaAPI.cpp +++ b/src/controllers/plugins/LuaAPI.cpp @@ -162,10 +162,10 @@ int c2_log(lua_State *L) int g_load(lua_State *L) { -#ifdef NDEBUG +# ifdef NDEBUG luaL_error(L, "load() is only usable in debug mode"); return 0; -#else +# else auto countArgs = lua_gettop(L); QByteArray data; if (lua::peek(L, &data, 1)) @@ -203,7 +203,7 @@ int g_load(lua_State *L) lua_call(L, countArgs, LUA_MULTRET); return lua_gettop(L); -#endif +# endif } int g_dofile(lua_State *L) diff --git a/src/controllers/plugins/PluginController.cpp b/src/controllers/plugins/PluginController.cpp index 7fe47c778..62c3be8f7 100644 --- a/src/controllers/plugins/PluginController.cpp +++ b/src/controllers/plugins/PluginController.cpp @@ -171,10 +171,10 @@ void PluginController::openLibrariesFor(lua_State *L, // possibly randomize this name at runtime to prevent some attacks? -#ifndef NDEBUG +# ifndef NDEBUG lua_getfield(L, gtable, "load"); lua_setfield(L, LUA_REGISTRYINDEX, "real_load"); -#endif +# endif lua_getfield(L, gtable, "dofile"); lua_setfield(L, LUA_REGISTRYINDEX, "real_dofile");