Skip to content

Commit

Permalink
feat: c o n s t c o r r e c t n e s s. [2]
Browse files Browse the repository at this point in the history
  • Loading branch information
SecondNewtonLaw committed Sep 1, 2024
1 parent 068268b commit 70cb8c9
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 18 deletions.
32 changes: 16 additions & 16 deletions Environment/Libraries/Closures.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -89,27 +89,27 @@ namespace RbxStu {
std::string Closures::GetLibraryName() { return "closures"; }

luaL_Reg *Closures::GetLibraryFunctions() {
const auto *reg = new luaL_Reg[]{{"checkcaller", RbxStu::Closures::checkcaller},
{"clonefunction", ClosureManager::clonefunction},
{"getcallingscript", RbxStu::Closures::getcallingscript},
const auto reg = new luaL_Reg[]{{"checkcaller", RbxStu::Closures::checkcaller},
{"clonefunction", ClosureManager::clonefunction},
{"getcallingscript", RbxStu::Closures::getcallingscript},

{"hookfunction", ClosureManager::hookfunction},
{"replaceclosure", ClosureManager::hookfunction},
{"unhookfunction", ClosureManager::unhookfunction},
{"restorefunction", ClosureManager::unhookfunction},
{"hookfunction", ClosureManager::hookfunction},
{"replaceclosure", ClosureManager::hookfunction},
{"unhookfunction", ClosureManager::unhookfunction},
{"restorefunction", ClosureManager::unhookfunction},

{"newlclosure", ClosureManager::newlclosure},
{"newcclosure", ClosureManager::newcclosure},
{"iscclosure", RbxStu::Closures::iscclosure},
{"islclosure", RbxStu::Closures::islclosure},
{"newlclosure", ClosureManager::newlclosure},
{"newcclosure", ClosureManager::newcclosure},
{"iscclosure", RbxStu::Closures::iscclosure},
{"islclosure", RbxStu::Closures::islclosure},

{"isourclosure", RbxStu::Closures::isourclosure},
{"checkclosure", RbxStu::Closures::isourclosure},
{"isexecutorclosure", RbxStu::Closures::isourclosure},
{"isourclosure", RbxStu::Closures::isourclosure},
{"checkclosure", RbxStu::Closures::isourclosure},
{"isexecutorclosure", RbxStu::Closures::isourclosure},

{"loadstring", RbxStu::Closures::loadstring},
{"loadstring", RbxStu::Closures::loadstring},

{nullptr, nullptr}};
{nullptr, nullptr}};

return reg;
}
2 changes: 1 addition & 1 deletion Environment/Libraries/Filesystem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,7 @@ luaL_Reg *Filesystem::GetLibraryFunctions() {
"Failed to get directory path of the dll! Filesystem functions will be disabled!");
}

const auto *reg = new luaL_Reg[]{
const auto reg = new luaL_Reg[]{
{"isfile", RbxStu::Filesystem::isfile},
{"isfolder", RbxStu::Filesystem::isfolder},
{"listfiles", RbxStu::Filesystem::listfiles},
Expand Down
2 changes: 1 addition & 1 deletion Environment/Libraries/Metatable.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ namespace RbxStu {

std::string Metatable::GetLibraryName() { return "metatable"; }
luaL_Reg *Metatable::GetLibraryFunctions() {
const auto *reg = new luaL_Reg[]{{"getrawmetatable", RbxStu::Metatable::getrawmetatable},
const auto reg = new luaL_Reg[]{{"getrawmetatable", RbxStu::Metatable::getrawmetatable},
{"setrawmetatable", RbxStu::Metatable::setrawmetatable},

{"hookmetamethod", RbxStu::Metatable::hookmetamethod},
Expand Down

0 comments on commit 70cb8c9

Please sign in to comment.