Skip to content

Commit

Permalink
Merge #965: [Trivial] Fix clang warning: 'csize' not initialized.
Browse files Browse the repository at this point in the history
808b5b6 Fix clang warning: 'csize' not initialized. (Zannick)

Pull request description:

  Initialize the `keyValueMap` directly from `s` instead.

Tree-SHA512: fb13a3b9ae7ddb50e23ab044d636617cf2a1140e28167e28805fcf59e4e67f88e625fca00d359688e0b7f2334342e5dd4bf41e74e5f26d35058738e8d95ff2c1
  • Loading branch information
CaveSpectre11 committed Sep 25, 2021
2 parents 0cfd270 + 808b5b6 commit 6c4f8b2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/veil/lru_cache.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ class SimpleLRUCache
CCriticalSection cs_mycache;

public:
SimpleLRUCache(int s) : csize(s < 1 ? 10 : s), keyValuesMap(csize) {}
SimpleLRUCache(int s) : csize(s < 1 ? 10 : s), keyValuesMap(s < 1 ? 10 : s) {}

void set(const K key, const V value) {
LOCK(cs_mycache);
Expand Down

0 comments on commit 6c4f8b2

Please sign in to comment.