Skip to content

Commit

Permalink
Merge pull request #11957 from lioncash/resource
Browse files Browse the repository at this point in the history
UICommon/ResourcePack: Allow priority helpers to take arguments by const reference
  • Loading branch information
AdmiralCurtiss committed Jun 16, 2023
2 parents afa8a47 + 653d6d0 commit 50301bf
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions Source/Core/UICommon/ResourcePack/Manager.cpp
Expand Up @@ -82,7 +82,7 @@ std::vector<ResourcePack>& GetPacks()
return packs;
}

std::vector<ResourcePack*> GetLowerPriorityPacks(ResourcePack& pack)
std::vector<ResourcePack*> GetLowerPriorityPacks(const ResourcePack& pack)
{
std::vector<ResourcePack*> list;
for (auto it = std::find(packs.begin(), packs.end(), pack) + 1; it != packs.end(); ++it)
Expand All @@ -97,7 +97,7 @@ std::vector<ResourcePack*> GetLowerPriorityPacks(ResourcePack& pack)
return list;
}

std::vector<ResourcePack*> GetHigherPriorityPacks(ResourcePack& pack)
std::vector<ResourcePack*> GetHigherPriorityPacks(const ResourcePack& pack)
{
std::vector<ResourcePack*> list;
auto end = std::find(packs.begin(), packs.end(), pack);
Expand Down
4 changes: 2 additions & 2 deletions Source/Core/UICommon/ResourcePack/Manager.h
Expand Up @@ -19,6 +19,6 @@ bool IsInstalled(const ResourcePack& pack);

std::vector<ResourcePack>& GetPacks();

std::vector<ResourcePack*> GetHigherPriorityPacks(ResourcePack& pack);
std::vector<ResourcePack*> GetLowerPriorityPacks(ResourcePack& pack);
std::vector<ResourcePack*> GetHigherPriorityPacks(const ResourcePack& pack);
std::vector<ResourcePack*> GetLowerPriorityPacks(const ResourcePack& pack);
} // namespace ResourcePack

0 comments on commit 50301bf

Please sign in to comment.