diff options
-rw-r--r-- | src/render/materialsystem/filterkey.cpp | 7 | ||||
-rw-r--r-- | src/render/materialsystem/filterkey_p.h | 9 |
2 files changed, 8 insertions, 8 deletions
diff --git a/src/render/materialsystem/filterkey.cpp b/src/render/materialsystem/filterkey.cpp index 2a3a4d9d0..7429735ef 100644 --- a/src/render/materialsystem/filterkey.cpp +++ b/src/render/materialsystem/filterkey.cpp @@ -47,7 +47,7 @@ void FilterKey::syncFromFrontEnd(const QNode *frontEnd, bool firstTime) } } -bool FilterKey::operator ==(const FilterKey &other) +bool FilterKey::equals(const FilterKey &other) const { if (&other == this) return true; @@ -65,11 +65,6 @@ bool FilterKey::operator ==(const FilterKey &other) other.value() == value()); } -bool FilterKey::operator !=(const FilterKey &other) -{ - return !operator ==(other); -} - } // namespace Render } // namespace Qt3DRender diff --git a/src/render/materialsystem/filterkey_p.h b/src/render/materialsystem/filterkey_p.h index bb27c8ced..e8bbf1b9d 100644 --- a/src/render/materialsystem/filterkey_p.h +++ b/src/render/materialsystem/filterkey_p.h @@ -36,10 +36,15 @@ public: const QVariant &value() const { return m_value; } const QString &name() const { return m_name; } void syncFromFrontEnd(const Qt3DCore::QNode *frontEnd, bool firstTime) override; - bool operator ==(const FilterKey &other); - bool operator !=(const FilterKey &other); + + friend bool operator==(const FilterKey &lhs, const FilterKey &rhs) + { return lhs.equals(rhs); } + friend bool operator !=(const FilterKey &lhs, const FilterKey &rhs) + { return !lhs.equals(rhs); } private: + bool equals(const FilterKey &other) const; + QVariant m_value; QString m_name; }; |