lock SignalVector with shared_lock to allow reading on other threads
This commit is contained in:
@@ -35,7 +35,7 @@ std::vector<QString> TwitchAccountManager::getUsernames() const
|
||||
|
||||
std::lock_guard<std::mutex> lock(this->mutex_);
|
||||
|
||||
for (const auto &user : this->accounts.getVector())
|
||||
for (const auto &user : this->accounts)
|
||||
{
|
||||
userNames.push_back(user->getUserName());
|
||||
}
|
||||
@@ -48,7 +48,7 @@ std::shared_ptr<TwitchAccount> TwitchAccountManager::findUserByUsername(
|
||||
{
|
||||
std::lock_guard<std::mutex> lock(this->mutex_);
|
||||
|
||||
for (const auto &user : this->accounts.getVector())
|
||||
for (const auto &user : this->accounts)
|
||||
{
|
||||
if (username.compare(user->getUserName(), Qt::CaseInsensitive) == 0)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user