Skip to content

Commit

Permalink
Rename PluginEntry to PluginLoadInfo for an explicit context.
Browse files Browse the repository at this point in the history
  • Loading branch information
poirierlouis committed May 13, 2024
1 parent ef73529 commit e673ae2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions src/dll/Systems/PluginSystem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ void PluginSystem::Startup()
return;
}

std::vector<PluginEntry> plugins;
std::vector<PluginLoadInfo> pluginInfos;

auto end = std::filesystem::end(iter);
for (; iter != end; iter.increment(ec))
Expand Down Expand Up @@ -129,7 +129,7 @@ void PluginSystem::Startup()

bool useAlteredSearchPath = depth == 1;

plugins.push_back({path, useAlteredSearchPath});
pluginInfos.push_back({path, useAlteredSearchPath});
}
else if (ec)
{
Expand All @@ -139,9 +139,9 @@ void PluginSystem::Startup()

// Load plugins after iterating with filesystem. Allow plugins to change their
// directory's structure without breaking loading of other plugins.
for (const auto& plugin : plugins)
for (const auto& pluginInfo : pluginInfos)
{
Load(plugin.path, plugin.useAlteredSearchPath);
Load(pluginInfo.path, pluginInfo.useAlteredSearchPath);
}

// In the case where the exe is hosted, check if the host exe has RED4Ext exports
Expand Down
2 changes: 1 addition & 1 deletion src/dll/Systems/PluginSystem.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class PluginSystem : public ISystem
using Map_t = std::unordered_map<HMODULE, std::shared_ptr<PluginBase>>;
using MapIter_t = Map_t::iterator;

struct PluginEntry
struct PluginLoadInfo
{
std::filesystem::path path;
bool useAlteredSearchPath;
Expand Down

0 comments on commit e673ae2

Please sign in to comment.