Skip to content

Commit 808b5b6

Browse files
committed
Fix clang warning: 'csize' not initialized.
Initialize the keyValueMap directly from s instead.
1 parent 0cfd270 commit 808b5b6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/veil/lru_cache.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ class SimpleLRUCache
4545
CCriticalSection cs_mycache;
4646

4747
public:
48-
SimpleLRUCache(int s) : csize(s < 1 ? 10 : s), keyValuesMap(csize) {}
48+
SimpleLRUCache(int s) : csize(s < 1 ? 10 : s), keyValuesMap(s < 1 ? 10 : s) {}
4949

5050
void set(const K key, const V value) {
5151
LOCK(cs_mycache);

0 commit comments

Comments
 (0)