mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-05-04 08:55:43 +08:00
style
This commit is contained in:
@@ -30,7 +30,7 @@ namespace BlackMisc
|
|||||||
*/
|
*/
|
||||||
bool CIndexVariantMap::operator !=(const CIndexVariantMap &other) const
|
bool CIndexVariantMap::operator !=(const CIndexVariantMap &other) const
|
||||||
{
|
{
|
||||||
return !(this->operator ==(other));
|
return !(*this == other);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -133,8 +133,7 @@ namespace BlackMisc
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
// replace values in one step
|
// replace values in one step
|
||||||
this->m_values.clear();
|
this->m_values.swap(newMap);
|
||||||
this->m_values.unite(newMap);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
@@ -112,9 +112,8 @@ namespace BlackMisc
|
|||||||
if (indexMap.isEmpty()) return 0;
|
if (indexMap.isEmpty()) return 0;
|
||||||
int c = 0;
|
int c = 0;
|
||||||
|
|
||||||
QMap<int, QVariant>::const_iterator it;
|
const auto &map = indexMap.map();
|
||||||
const QMap<int, QVariant> &map = indexMap.map();
|
for (auto it = map.begin(); it != map.end(); ++it)
|
||||||
for (it = map.begin(); it != map.end(); ++it)
|
|
||||||
{
|
{
|
||||||
this->setPropertyByIndex(it.value(), it.key());
|
this->setPropertyByIndex(it.value(), it.key());
|
||||||
}
|
}
|
||||||
@@ -127,9 +126,8 @@ namespace BlackMisc
|
|||||||
bool operator==(const CIndexVariantMap &indexMap, const CValueObject &valueObject)
|
bool operator==(const CIndexVariantMap &indexMap, const CValueObject &valueObject)
|
||||||
{
|
{
|
||||||
if (indexMap.isEmpty()) return indexMap.isWildcard();
|
if (indexMap.isEmpty()) return indexMap.isWildcard();
|
||||||
QMap<int, QVariant>::const_iterator it;
|
const auto &map = indexMap.map();
|
||||||
const QMap<int, QVariant> &map = indexMap.map();
|
for (auto it = map.begin(); it != map.end(); ++it)
|
||||||
for (it = map.begin(); it != map.end(); ++it)
|
|
||||||
{
|
{
|
||||||
// QVariant cannot be compared directly
|
// QVariant cannot be compared directly
|
||||||
QVariant p = valueObject.propertyByIndex(it.key()); // from value object
|
QVariant p = valueObject.propertyByIndex(it.key()); // from value object
|
||||||
|
|||||||
Reference in New Issue
Block a user