refs #460 CDataCache for dynamic (downloaded/generated) data with file-based distribution among processes.

This commit is contained in:
Mathew Sutcliffe
2015-09-13 02:08:51 +01:00
parent 56d8bf4651
commit 6601393df8
7 changed files with 296 additions and 2 deletions

View File

@@ -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
{