Thank you clang-format for at least having a diff

This commit is contained in:
Mm2PL 2023-02-13 00:13:53 +01:00
parent 0cbac04529
commit 6e67890152
2 changed files with 5 additions and 5 deletions

View file

@ -162,10 +162,10 @@ int c2_log(lua_State *L)
int g_load(lua_State *L) int g_load(lua_State *L)
{ {
#ifdef NDEBUG # ifdef NDEBUG
luaL_error(L, "load() is only usable in debug mode"); luaL_error(L, "load() is only usable in debug mode");
return 0; return 0;
#else # else
auto countArgs = lua_gettop(L); auto countArgs = lua_gettop(L);
QByteArray data; QByteArray data;
if (lua::peek(L, &data, 1)) if (lua::peek(L, &data, 1))
@ -203,7 +203,7 @@ int g_load(lua_State *L)
lua_call(L, countArgs, LUA_MULTRET); lua_call(L, countArgs, LUA_MULTRET);
return lua_gettop(L); return lua_gettop(L);
#endif # endif
} }
int g_dofile(lua_State *L) int g_dofile(lua_State *L)

View file

@ -171,10 +171,10 @@ void PluginController::openLibrariesFor(lua_State *L,
// possibly randomize this name at runtime to prevent some attacks? // possibly randomize this name at runtime to prevent some attacks?
#ifndef NDEBUG # ifndef NDEBUG
lua_getfield(L, gtable, "load"); lua_getfield(L, gtable, "load");
lua_setfield(L, LUA_REGISTRYINDEX, "real_load"); lua_setfield(L, LUA_REGISTRYINDEX, "real_load");
#endif # endif
lua_getfield(L, gtable, "dofile"); lua_getfield(L, gtable, "dofile");
lua_setfield(L, LUA_REGISTRYINDEX, "real_dofile"); lua_setfield(L, LUA_REGISTRYINDEX, "real_dofile");