Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e2f4d548 authored by Romain Guy's avatar Romain Guy Committed by Android Git Automerger
Browse files

am d3209c1b: Merge "GenerationCache::get would return a random value instead of NULL Bug #5401917"

* commit 'd3209c1bb21ce026d4e41464740e3d8f57cdd56f':
  GenerationCache::get would return a random value instead of NULL Bug #5401917
parents d516e8c1 b634cd3f
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -88,11 +88,13 @@ private:

    void attachToCache(const sp<Entry<K, V> >& entry);
    void detachFromCache(const sp<Entry<K, V> >& entry);

    const V mNullValue;
}; // class GenerationCache

template<typename K, typename V>
GenerationCache<K, V>::GenerationCache(uint32_t maxCapacity): mMaxCapacity(maxCapacity),
    mListener(NULL) {
    mListener(NULL), mNullValue(NULL) {
};

template<typename K, typename V>
@@ -154,7 +156,7 @@ const V& GenerationCache<K, V>::get(const K& key) {
        return entry->value;
    }

    return NULL;
    return mNullValue;
}

template<typename K, typename V>