From 1e9f30b2b0885aacfd347e8d26121892e94e9dc6 Mon Sep 17 00:00:00 2001 From: David Lowndes Date: Thu, 21 Nov 2024 21:36:59 +0000 Subject: [PATCH] format --- src/common/LuaSupport.cpp | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/src/common/LuaSupport.cpp b/src/common/LuaSupport.cpp index f7136540d36..57bfc929cbe 100644 --- a/src/common/LuaSupport.cpp +++ b/src/common/LuaSupport.cpp @@ -181,9 +181,13 @@ bool Surge::LuaSupport::setSurgeFunctionEnvironment(lua_State *L) lua_setfield(L, eidx, sharedTableName); // add whitelisted functions and modules - static constexpr std::initializer_list sandboxWhitelist{ - "pairs", "ipairs", "unpack", "next", "type", - "tostring", "tonumber", "setmetatable", "error"}; + + // clang-format off + static constexpr std::initializer_list sandboxWhitelist + {"pairs", "ipairs", "unpack", + "next", "type", "tostring", + "tonumber", "setmetatable", "error"}; + // clang-format on for (const auto &f : sandboxWhitelist) { @@ -198,8 +202,9 @@ bool Surge::LuaSupport::setSurgeFunctionEnvironment(lua_State *L) } // add library tables - static constexpr std::initializer_list sandboxLibraryTables = {"math", "string", - "table", "bit"}; + // clang-format off + static constexpr std::initializer_list sandboxLibraryTables = {"math", "string", "table", "bit"}; + // clang-format on for (const auto &t : sandboxLibraryTables) { lua_getglobal(L, t); // stack: f>t>(t)