Remove unused PluginController::callEvery{,WithArgs}

This commit is contained in:
Mm2PL 2023-02-11 00:06:46 +01:00
parent a40d29a514
commit 87605077cb
No known key found for this signature in database
GPG key ID: 94AC9B80EFA15ED9
2 changed files with 0 additions and 27 deletions

View file

@ -259,28 +259,6 @@ bool PluginController::reload(const QString &codename)
return true; return true;
} }
void PluginController::callEvery(const QString &functionName)
{
for (const auto &[name, plugin] : this->plugins_)
{
lua_getglobal(plugin->state_, functionName.toStdString().c_str());
lua_pcall(plugin->state_, 0, 0, 0);
}
}
void PluginController::callEveryWithArgs(
const QString &functionName, int count,
const std::function<void(const std::unique_ptr<Plugin> &pl, lua_State *L)>
&argCb)
{
for (const auto &[name, plugin] : this->plugins_)
{
lua_getglobal(plugin->state_, functionName.toStdString().c_str());
argCb(plugin, plugin->state_);
lua_pcall(plugin->state_, count, 0, 0);
}
}
QString PluginController::tryExecPluginCommand(const QString &commandName, QString PluginController::tryExecPluginCommand(const QString &commandName,
const CommandContext &ctx) const CommandContext &ctx)
{ {

View file

@ -28,11 +28,6 @@ class PluginController : public Singleton
public: public:
void initialize(Settings &settings, Paths &paths) override; void initialize(Settings &settings, Paths &paths) override;
void save() override{}; void save() override{};
void callEvery(const QString &functionName);
void callEveryWithArgs(
const QString &functionName, int count,
const std::function<void(const std::unique_ptr<Plugin> &pl,
lua_State *L)> &argCb);
QString tryExecPluginCommand(const QString &commandName, QString tryExecPluginCommand(const QString &commandName,
const CommandContext &ctx); const CommandContext &ctx);