MCPcopy Create free account
hub / github.com/TypesettingTools/Aegisub / RegisterCommand

Method RegisterCommand

src/auto4_lua.cpp:562–571  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

560 }
561
562 void LuaScript::RegisterCommand(LuaCommand *command)
563 {
564 for (auto macro : macros) {
565 if (macro->name() == command->name()) {
566 error(L, "A macro named '%s' is already defined in script '%s'",
567 command->StrDisplay(nullptr).utf8_str().data(), name.c_str());
568 }
569 }
570 macros.push_back(command);
571 }
572
573 void LuaScript::UnregisterCommand(LuaCommand *command)
574 {

Callers 1

LuaCommandMethod · 0.80

Calls 4

errorFunction · 0.85
push_backMethod · 0.80
nameMethod · 0.45
StrDisplayMethod · 0.45

Tested by

no test coverage detected