mirror of
https://github.com/loot/libloot.git
synced 2026-07-27 14:16:01 -07:00
Pass vector into GetOverlapSize() by reference
The function is only used when sorting Morrowind plugins, but this should remove some unnecessary overhead in that case.
This commit is contained in:
+1
-1
@@ -195,7 +195,7 @@ bool Plugin::DoFormIDsOverlap(const PluginInterface& plugin) const {
|
||||
}
|
||||
|
||||
size_t Plugin::GetOverlapSize(
|
||||
const std::vector<const PluginInterface*> plugins) const {
|
||||
const std::vector<const PluginInterface*>& plugins) const {
|
||||
if (plugins.empty()) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
+2
-2
@@ -47,7 +47,7 @@ public:
|
||||
virtual uint32_t GetRecordAndGroupCount() const = 0;
|
||||
|
||||
virtual size_t GetOverlapSize(
|
||||
const std::vector<const PluginInterface*> plugins) const = 0;
|
||||
const std::vector<const PluginInterface*>& plugins) const = 0;
|
||||
};
|
||||
|
||||
class Plugin final : public PluginSortingInterface {
|
||||
@@ -73,7 +73,7 @@ public:
|
||||
bool LoadsArchive() const override;
|
||||
bool DoFormIDsOverlap(const PluginInterface& plugin) const override;
|
||||
size_t GetOverlapSize(
|
||||
const std::vector<const PluginInterface*> plugins) const override;
|
||||
const std::vector<const PluginInterface*>& plugins) const override;
|
||||
|
||||
// Load ordering functions.
|
||||
size_t NumOverrideFormIDs() const override;
|
||||
|
||||
Reference in New Issue
Block a user