diff --git a/src/controllers/plugins/LuaAPI.cpp b/src/controllers/plugins/LuaAPI.cpp index 5cae62473..c0a7d887d 100644 --- a/src/controllers/plugins/LuaAPI.cpp +++ b/src/controllers/plugins/LuaAPI.cpp @@ -16,6 +16,22 @@ # include # include +namespace { +using namespace chatterino; + +void logHelper(lua_State *L, Plugin *pl, QDebug stream, int argc) +{ + stream.noquote(); + stream << "[" + pl->id + ":" + pl->meta.name + "]"; + for (int i = 1; i <= argc; i++) + { + stream << lua::toString(L, i); + } + lua_pop(L, argc); +} + +} // namespace + // NOLINTBEGIN(*vararg) // luaL_error is a c-style vararg function, this makes clang-tidy not dislike it so much namespace chatterino::lua::api { @@ -101,20 +117,6 @@ int c2_system_msg(lua_State *L) return 1; } -namespace { - void logHelper(lua_State *L, Plugin *pl, QDebug stream, int argc) - { - stream.noquote(); - stream << "[" + pl->id + ":" + pl->meta.name + "]"; - for (int i = 1; i <= argc; i++) - { - stream << lua::toString(L, i); - } - lua_pop(L, argc); - } - -} // namespace - int c2_log(lua_State *L) { auto *pl = getApp()->plugins->getPluginByStatePtr(L);