Merge pull request #11957 from lioncash/resource
UICommon/ResourcePack: Allow priority helpers to take arguments by const reference
This commit is contained in:
commit
50301bf1d1
|
@ -82,7 +82,7 @@ std::vector<ResourcePack>& GetPacks()
|
||||||
return packs;
|
return packs;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::vector<ResourcePack*> GetLowerPriorityPacks(ResourcePack& pack)
|
std::vector<ResourcePack*> GetLowerPriorityPacks(const ResourcePack& pack)
|
||||||
{
|
{
|
||||||
std::vector<ResourcePack*> list;
|
std::vector<ResourcePack*> list;
|
||||||
for (auto it = std::find(packs.begin(), packs.end(), pack) + 1; it != packs.end(); ++it)
|
for (auto it = std::find(packs.begin(), packs.end(), pack) + 1; it != packs.end(); ++it)
|
||||||
|
@ -97,7 +97,7 @@ std::vector<ResourcePack*> GetLowerPriorityPacks(ResourcePack& pack)
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::vector<ResourcePack*> GetHigherPriorityPacks(ResourcePack& pack)
|
std::vector<ResourcePack*> GetHigherPriorityPacks(const ResourcePack& pack)
|
||||||
{
|
{
|
||||||
std::vector<ResourcePack*> list;
|
std::vector<ResourcePack*> list;
|
||||||
auto end = std::find(packs.begin(), packs.end(), pack);
|
auto end = std::find(packs.begin(), packs.end(), pack);
|
||||||
|
|
|
@ -19,6 +19,6 @@ bool IsInstalled(const ResourcePack& pack);
|
||||||
|
|
||||||
std::vector<ResourcePack>& GetPacks();
|
std::vector<ResourcePack>& GetPacks();
|
||||||
|
|
||||||
std::vector<ResourcePack*> GetHigherPriorityPacks(ResourcePack& pack);
|
std::vector<ResourcePack*> GetHigherPriorityPacks(const ResourcePack& pack);
|
||||||
std::vector<ResourcePack*> GetLowerPriorityPacks(ResourcePack& pack);
|
std::vector<ResourcePack*> GetLowerPriorityPacks(const ResourcePack& pack);
|
||||||
} // namespace ResourcePack
|
} // namespace ResourcePack
|
||||||
|
|
Loading…
Reference in New Issue