mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-22 23:05:36 +08:00
refs #356 Non-member equality operators for CPropertyIndexVariantMap.
This commit is contained in:
@@ -30,17 +30,17 @@ namespace BlackMisc
|
||||
/*
|
||||
* ==
|
||||
*/
|
||||
bool CPropertyIndexVariantMap::operator ==(const CPropertyIndexVariantMap &other) const
|
||||
bool operator ==(const CPropertyIndexVariantMap &a, const CPropertyIndexVariantMap &b)
|
||||
{
|
||||
return this->m_wildcard == other.m_wildcard && this->m_values == other.m_values;
|
||||
return a.m_wildcard == b.m_wildcard && a.m_values == b.m_values;
|
||||
}
|
||||
|
||||
/*
|
||||
* !=
|
||||
*/
|
||||
bool CPropertyIndexVariantMap::operator !=(const CPropertyIndexVariantMap &other) const
|
||||
bool operator !=(const CPropertyIndexVariantMap &a, const CPropertyIndexVariantMap &b)
|
||||
{
|
||||
return !(*this == other);
|
||||
return !(b == a);
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
@@ -92,10 +92,10 @@ namespace BlackMisc
|
||||
void clear() { this->m_values.clear(); }
|
||||
|
||||
//! Equal operator, required if maps are directly compared, not with CValueObject
|
||||
bool operator ==(const CPropertyIndexVariantMap &other) const;
|
||||
friend bool operator ==(const CPropertyIndexVariantMap &a, const CPropertyIndexVariantMap &b);
|
||||
|
||||
//! Equal operator, required if maps are directly compared, not with CValueObject
|
||||
bool operator !=(const CPropertyIndexVariantMap &other) const;
|
||||
friend bool operator !=(const CPropertyIndexVariantMap &a, const CPropertyIndexVariantMap &b);
|
||||
|
||||
//! Map
|
||||
const QMap<CPropertyIndex, CVariant> &map() const { return this->m_values; }
|
||||
|
||||
Reference in New Issue
Block a user