DatabaseInterface::GetKnownBashTags(): the collection elements should be unique and lexicographical ordering is helpful for displaying the elements, but O(log N) lookup and insertion aren't important as LOOT just iterates over the set, so a vector of unique elements is good enough. It doesn't even need to be sorted, as that's more of a UI issue, but ensuring uniqueness is easier if it's sorted first.
GameInterface::GetLoadedPlugins(): The plugin set is only ever iterated over, and the ordering of elements is meaningless.
PluginInterface::GetBashTags(): The uniqueness constraint is not very useful as it enforces object uniqueness, including conditions. The sorting is useful for displaying the collection, but that can be done by the UI.
Several member variables of PluginMetadata and their getters and setters: in all cases the uniqueness constraint is not useful as it enforces object uniqueness including data that is not meaningful for display purposes, and the sorting is not very useful for the same reason, plus the fact that it means PluginMetadata objects that are deserialised and then serialised do not necessarily retain the order of elements (though this doesn't really matter).
The public API uses
std::set
in a few places:DatabaseInterface::GetKnownBashTags()
: the collection elements should be unique and lexicographical ordering is helpful for displaying the elements, butO(log N)
lookup and insertion aren't important as LOOT just iterates over the set, so a vector of unique elements is good enough. It doesn't even need to be sorted, as that's more of a UI issue, but ensuring uniqueness is easier if it's sorted first.GameInterface::GetLoadedPlugins()
: The plugin set is only ever iterated over, and the ordering of elements is meaningless.PluginInterface::GetBashTags()
: The uniqueness constraint is not very useful as it enforces object uniqueness, including conditions. The sorting is useful for displaying the collection, but that can be done by the UI.PluginMetadata
and their getters and setters: in all cases the uniqueness constraint is not useful as it enforces object uniqueness including data that is not meaningful for display purposes, and the sorting is not very useful for the same reason, plus the fact that it meansPluginMetadata
objects that are deserialised and then serialised do not necessarily retain the order of elements (though this doesn't really matter).