mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-15 01:05:35 +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(); }
|
void clear() { this->m_values.clear(); }
|
||||||
|
|
||||||
//! Equal operator, required if maps are directly compared, not with CValueObject
|
//! 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
|
//! 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
|
//! Map
|
||||||
const QMap<CPropertyIndex, CVariant> &map() const { return this->m_values; }
|
const QMap<CPropertyIndex, CVariant> &map() const { return this->m_values; }
|
||||||
|
|||||||
Reference in New Issue
Block a user