Fix comment and fix formatting

Signed-off-by: JCW <a1q123456@users.noreply.github.com>
This commit is contained in:
JCW
2025-07-31 14:57:43 +01:00
parent 6e6ea4311b
commit b98b42bbec
2 changed files with 4 additions and 4 deletions

View File

@@ -130,7 +130,7 @@ public:
@param replaceCallback Function that decides if cache should be replaced
@return First item: `true` If the key already existed; Second item: The
in the cache.
canonicalized item.
*/
template <class R>
std::pair<bool, SharedPointerType>

View File

@@ -501,8 +501,7 @@ TaggedCache<
key_type const& key,
SharedPointerType const& data)
{
auto [alreadyExists, _] = canonicalize(
key, data, []() { return true; });
auto [alreadyExists, _] = canonicalize(key, data, []() { return true; });
return alreadyExists;
}
@@ -527,7 +526,8 @@ TaggedCache<
Mutex>::
canonicalize_replace_client(key_type const& key, SharedPointerType& data)
{
auto [alreadyExists, itemInCache] = canonicalize(key, data, []() { return false; });
auto [alreadyExists, itemInCache] =
canonicalize(key, data, []() { return false; });
data = itemInCache;
return alreadyExists;
}