Skip to content

Commit

Permalink
Move iteration into own scope
Browse files Browse the repository at this point in the history
  • Loading branch information
Maschell committed Apr 20, 2024
1 parent 5a892ee commit 1ac38cb
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions wumsloader/src/entry.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -126,14 +126,16 @@ void doStart(int argc, char **argv) {
// Order modules list by dependencies.
gLoadedModules = OrderModulesByDependencies(gLoadedModules);

// make sure the plugin backend module is at the end.
auto it = std::find_if(gLoadedModules.begin(),
gLoadedModules.end(),
[](auto &cur) { return std::string_view(cur->getExportName()) == "homebrew_wupsbackend"; });
if (it != gLoadedModules.end()) {
auto module = *it;
gLoadedModules.erase(it);
gLoadedModules.push_back(module);
{
// make sure the plugin backend module is at the end.
auto it = std::find_if(gLoadedModules.begin(),
gLoadedModules.end(),
[](auto &cur) { return std::string_view(cur->getExportName()) == "homebrew_wupsbackend"; });
if (it != gLoadedModules.end()) {
auto module = *it;
gLoadedModules.erase(it);
gLoadedModules.push_back(module);
}
}

bool aromaBaseModuleLoaded = false;
Expand Down

0 comments on commit 1ac38cb

Please sign in to comment.