Use `CacheRef(storage, entry)` c'tor as it is generally preferred

Passing any string here is more likely a mistake, see previous commit
This commit is contained in:
Martchus 2022-02-01 22:58:32 +01:00
parent 2a256e6ac1
commit d1d65dac80
1 changed files with 2 additions and 2 deletions

View File

@ -119,7 +119,7 @@ auto StorageCache<StorageEntriesType, StorageType, SpecType>::store(Storage &sto
// check for package in cache
using CacheEntry = typename Entries::StorageEntry;
using CacheRef = typename Entries::Ref;
const auto ref = CacheRef(storage, entry->name);
const auto ref = CacheRef(storage, entry);
auto res = StorageCache::StoreResult();
auto lock = std::unique_lock(m_mutex);
auto *cacheEntry = m_entries.find(ref);
@ -167,7 +167,7 @@ auto StorageCache<StorageEntriesType, StorageType, SpecType>::store(Storage &sto
// check for package in cache
using CacheEntry = typename Entries::StorageEntry;
using CacheRef = typename Entries::Ref;
const auto ref = CacheRef(storage, entry->name);
const auto ref = CacheRef(storage, entry);
auto res = StorageCache::StoreResult();
auto lock = std::unique_lock(m_mutex);
auto *cacheEntry = m_entries.find(ref);