diff --git a/src/common/SignalVector.hpp b/src/common/SignalVector.hpp index 074614d88..33bd8254c 100644 --- a/src/common/SignalVector.hpp +++ b/src/common/SignalVector.hpp @@ -171,15 +171,4 @@ private: std::function itemCompare_; }; -// compatability -template -class SortedSignalVector : public SignalVector -{ -public: - SortedSignalVector() - : SignalVector(Compare{}) - { - } -}; - } // namespace chatterino diff --git a/src/controllers/accounts/AccountController.cpp b/src/controllers/accounts/AccountController.cpp index d44e00d5b..2692b05a9 100644 --- a/src/controllers/accounts/AccountController.cpp +++ b/src/controllers/accounts/AccountController.cpp @@ -7,6 +7,7 @@ namespace chatterino { AccountController::AccountController() + : accounts_(SharedPtrElementLess{}) { this->twitch.accounts.itemInserted.connect([this](const auto &args) { this->accounts_.insert(std::dynamic_pointer_cast(args.item)); diff --git a/src/controllers/accounts/AccountController.hpp b/src/controllers/accounts/AccountController.hpp index e297b9e4d..e1ef3c70a 100644 --- a/src/controllers/accounts/AccountController.hpp +++ b/src/controllers/accounts/AccountController.hpp @@ -27,8 +27,7 @@ public: TwitchAccountManager twitch; private: - SortedSignalVector, SharedPtrElementLess> - accounts_; + SignalVector> accounts_; }; } // namespace chatterino diff --git a/src/controllers/taggedusers/TaggedUsersController.cpp b/src/controllers/taggedusers/TaggedUsersController.cpp index 095bd779d..a42265fd4 100644 --- a/src/controllers/taggedusers/TaggedUsersController.cpp +++ b/src/controllers/taggedusers/TaggedUsersController.cpp @@ -5,6 +5,7 @@ namespace chatterino { TaggedUsersController::TaggedUsersController() + : users(std::less{}) { } diff --git a/src/controllers/taggedusers/TaggedUsersController.hpp b/src/controllers/taggedusers/TaggedUsersController.hpp index db9ff2d14..ea917195a 100644 --- a/src/controllers/taggedusers/TaggedUsersController.hpp +++ b/src/controllers/taggedusers/TaggedUsersController.hpp @@ -14,7 +14,7 @@ class TaggedUsersController final : public Singleton public: TaggedUsersController(); - SortedSignalVector> users; + SignalVector users; TaggedUsersModel *createModel(QObject *parent = nullptr); }; diff --git a/src/providers/twitch/TwitchAccountManager.cpp b/src/providers/twitch/TwitchAccountManager.cpp index 5369e40e4..c3b2ee69c 100644 --- a/src/providers/twitch/TwitchAccountManager.cpp +++ b/src/providers/twitch/TwitchAccountManager.cpp @@ -7,7 +7,8 @@ namespace chatterino { TwitchAccountManager::TwitchAccountManager() - : anonymousUser_(new TwitchAccount(ANONYMOUS_USERNAME, "", "", "")) + : accounts(SharedPtrElementLess{}) + , anonymousUser_(new TwitchAccount(ANONYMOUS_USERNAME, "", "", "")) { this->currentUserChanged.connect([this] { auto currentUser = this->getCurrent(); diff --git a/src/providers/twitch/TwitchAccountManager.hpp b/src/providers/twitch/TwitchAccountManager.hpp index c9ce0215e..5956fdf00 100644 --- a/src/providers/twitch/TwitchAccountManager.hpp +++ b/src/providers/twitch/TwitchAccountManager.hpp @@ -51,9 +51,7 @@ public: pajlada::Signals::NoArgSignal currentUserChanged; pajlada::Signals::NoArgSignal userListUpdated; - SortedSignalVector, - SharedPtrElementLess> - accounts; + SignalVector> accounts; private: enum class AddUserResponse {