Commit 92ed4394 authored by David Faure's avatar David Faure

EntityCollectionOrderProxyModel: fix double-lookup (small speed optimisation)

parent bc1fc93d
......@@ -39,8 +39,9 @@ public:
int collectionRank(const Akonadi::Collection &collection)
{
const Akonadi::Collection::Id id = collection.id();
if (collectionRanks.contains(id)) {
return collectionRanks[id];
const int cachedRank = collectionRanks.value(id, -1);
if (cachedRank != -1) {
return cachedRank;
}
int rank = 100;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment