mutex_protected: Return bool for operator==

This commit is contained in:
Jonas Kvinge 2024-11-10 15:37:35 +01:00
parent 3de3c52c01
commit 04064ebf68
1 changed files with 3 additions and 3 deletions

View File

@ -37,12 +37,12 @@ class mutex_protected : public boost::noncopyable {
return value_; return value_;
} }
T operator==(const mutex_protected &value) const { bool operator==(const mutex_protected &value) const {
QMutexLocker l(&mutex_); QMutexLocker l(&mutex_);
return value == value_; return value.value() == value_;
} }
T operator==(const T value) const { bool operator==(const T value) const {
QMutexLocker l(&mutex_); QMutexLocker l(&mutex_);
return value == value_; return value == value_;
} }