diff --git a/cockatrice/src/client/ui/picture_loader/picture_to_load.cpp b/cockatrice/src/client/ui/picture_loader/picture_to_load.cpp index 9800d7cc5..81210a983 100644 --- a/cockatrice/src/client/ui/picture_loader/picture_to_load.cpp +++ b/cockatrice/src/client/ui/picture_loader/picture_to_load.cpp @@ -1,6 +1,7 @@ #include "picture_to_load.h" #include "../../../settings/cache_settings.h" +#include "../../../utility/card_set_comparator.h" #include #include @@ -20,7 +21,7 @@ PictureToLoad::PictureToLoad(CardInfoPtr _card) if (sortedSets.empty()) { sortedSets << CardSet::newInstance("", "", "", QDate()); } - std::sort(sortedSets.begin(), sortedSets.end(), SetDownloadPriorityComparator()); + std::sort(sortedSets.begin(), sortedSets.end(), SetPriorityComparator()); // If the user hasn't disabled arts other than their personal preference... if (!SettingsCache::instance().getOverrideAllCardArtWithPersonalPreference()) { diff --git a/cockatrice/src/client/ui/picture_loader/picture_to_load.h b/cockatrice/src/client/ui/picture_loader/picture_to_load.h index 9d1a784f0..38ebe5763 100644 --- a/cockatrice/src/client/ui/picture_loader/picture_to_load.h +++ b/cockatrice/src/client/ui/picture_loader/picture_to_load.h @@ -10,24 +10,6 @@ inline Q_LOGGING_CATEGORY(PictureToLoadLog, "picture_loader.picture_to_load"); class PictureToLoad { private: - class SetDownloadPriorityComparator - { - public: - /* - * Returns true if a has higher download priority than b - * Enabled sets have priority over disabled sets - * Both groups follows the user-defined order - */ - inline bool operator()(const CardSetPtr &a, const CardSetPtr &b) const - { - if (a->getEnabled()) { - return !b->getEnabled() || a->getSortKey() < b->getSortKey(); - } else { - return !b->getEnabled() && a->getSortKey() < b->getSortKey(); - } - } - }; - CardInfoPtr card; QList sortedSets; QList urlTemplates;