revert: 移除find_plugin

@zzyyyl

link to 48a9c81e8c
This commit is contained in:
status102
2024-07-23 17:19:14 +08:00
parent 55198c76da
commit a9cdc678f1

View File

@@ -55,17 +55,6 @@ namespace asst
m_plugins.emplace_back(plugin);
}
template <typename PluginType>
requires std::derived_from<PluginType, AbstractTaskPlugin>
std::shared_ptr<PluginType> find_plugin() const
{
for (const auto& plugin : m_plugins) {
if (auto ptr = std::dynamic_pointer_cast<PluginType>(plugin)) {
return ptr;
}
}
return nullptr;
}
void clear_plugin() noexcept;
bool get_enable() const noexcept { return m_enable; }