Skip to content

Commit

Permalink
Updated Syntax.
Browse files Browse the repository at this point in the history
  • Loading branch information
DMJC committed Jan 16, 2025
1 parent c96733e commit e34eab2
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/wcm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1745,14 +1745,15 @@ void update_compound_from_section(wf::config::compound_option_t *compound,
compound->set_value_untyped(value);
}

Plugin* WCM::find_plugin_by_name(std::vector<Plugin*> plugins, std::string search_name)
Plugin*WCM::find_plugin_by_name(std::vector<Plugin*> plugins, std::string search_name)
{
auto it = std::find_if(plugins.begin(), plugins.end(),
[&search_name](const Plugin* plugin) {
return plugin->name == search_name; // Compare the plugin name
});

if (it != plugins.end()) {
if (it != plugins.end())
{
return *it; // Return the found Plugin pointer
}
std::cout << "plugin not found, name invalid" << std::endl;
Expand Down

0 comments on commit e34eab2

Please sign in to comment.