Loading libutils/LruCache_test.cpp +7 −4 Original line number Diff line number Diff line Loading @@ -29,6 +29,8 @@ typedef const char* StringValue; struct ComplexKey { int k; explicit ComplexKey() : k(0) { instanceCount += 1; } explicit ComplexKey(int k) : k(k) { instanceCount += 1; } Loading Loading @@ -57,6 +59,8 @@ ssize_t ComplexKey::instanceCount = 0; struct ComplexValue { int v; explicit ComplexValue() : v(0) { instanceCount += 1; } explicit ComplexValue(int v) : v(v) { instanceCount += 1; } Loading @@ -83,9 +87,8 @@ struct KeyWithPointer { struct KeyFailsOnCopy : public ComplexKey { public: KeyFailsOnCopy(const KeyFailsOnCopy& key) : ComplexKey(key) { ADD_FAILURE(); } KeyFailsOnCopy() : ComplexKey() {} KeyFailsOnCopy(const KeyFailsOnCopy& key) : ComplexKey(key) { ADD_FAILURE(); } KeyFailsOnCopy(int key) : ComplexKey(key) {} }; Loading libutils/include/utils/LruCache.h +6 −6 Original line number Diff line number Diff line Loading @@ -161,12 +161,12 @@ public: // Implementation is here, because it's fully templated template <typename TKey, typename TValue> LruCache<TKey, TValue>::LruCache(uint32_t maxCapacity) : mSet(new LruCacheSet()) , mListener(nullptr) , mOldest(nullptr) , mYoungest(nullptr) , mMaxCapacity(maxCapacity) , mNullValue(0) { : mSet(new LruCacheSet()), mListener(nullptr), mOldest(nullptr), mYoungest(nullptr), mMaxCapacity(maxCapacity), mNullValue{} { mSet->max_load_factor(1.0); }; Loading Loading
libutils/LruCache_test.cpp +7 −4 Original line number Diff line number Diff line Loading @@ -29,6 +29,8 @@ typedef const char* StringValue; struct ComplexKey { int k; explicit ComplexKey() : k(0) { instanceCount += 1; } explicit ComplexKey(int k) : k(k) { instanceCount += 1; } Loading Loading @@ -57,6 +59,8 @@ ssize_t ComplexKey::instanceCount = 0; struct ComplexValue { int v; explicit ComplexValue() : v(0) { instanceCount += 1; } explicit ComplexValue(int v) : v(v) { instanceCount += 1; } Loading @@ -83,9 +87,8 @@ struct KeyWithPointer { struct KeyFailsOnCopy : public ComplexKey { public: KeyFailsOnCopy(const KeyFailsOnCopy& key) : ComplexKey(key) { ADD_FAILURE(); } KeyFailsOnCopy() : ComplexKey() {} KeyFailsOnCopy(const KeyFailsOnCopy& key) : ComplexKey(key) { ADD_FAILURE(); } KeyFailsOnCopy(int key) : ComplexKey(key) {} }; Loading
libutils/include/utils/LruCache.h +6 −6 Original line number Diff line number Diff line Loading @@ -161,12 +161,12 @@ public: // Implementation is here, because it's fully templated template <typename TKey, typename TValue> LruCache<TKey, TValue>::LruCache(uint32_t maxCapacity) : mSet(new LruCacheSet()) , mListener(nullptr) , mOldest(nullptr) , mYoungest(nullptr) , mMaxCapacity(maxCapacity) , mNullValue(0) { : mSet(new LruCacheSet()), mListener(nullptr), mOldest(nullptr), mYoungest(nullptr), mMaxCapacity(maxCapacity), mNullValue{} { mSet->max_load_factor(1.0); }; Loading