mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-21 12:55:31 +08:00
refs #460 CDataCache for dynamic (downloaded/generated) data with file-based distribution among processes.
This commit is contained in:
@@ -220,6 +220,17 @@ namespace BlackMisc
|
||||
removeByValueIf(BlackMisc::Predicates::MemberEqual(membFunc, returnValue));
|
||||
}
|
||||
|
||||
//! Remove elements for which the same key/value pair is present in an other dictionary.
|
||||
void removeDuplicates(const CDictionary &other)
|
||||
{
|
||||
for (auto it = begin(); it != end();)
|
||||
{
|
||||
auto it2 = other.find(it.key());
|
||||
if (it2 != other.end() && it.value() == it2.value()) { it = erase(it); }
|
||||
else { ++it; }
|
||||
}
|
||||
}
|
||||
|
||||
//! \copydoc CValueObject::toJson
|
||||
QJsonObject toJson() const
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user