From 53592f1f6fed0c86eab671db993a3e8c9a8a60ae Mon Sep 17 00:00:00 2001 From: Valentin Balaschenko <13349202+vlntb@users.noreply.github.com> Date: Wed, 15 Jul 2026 13:43:59 +0100 Subject: [PATCH] formatting --- include/xrpl/basics/TaggedCache.h | 40 ++++++++++++++++--------------- 1 file changed, 21 insertions(+), 19 deletions(-) diff --git a/include/xrpl/basics/TaggedCache.h b/include/xrpl/basics/TaggedCache.h index 1860fa1fd9..680a863ccc 100644 --- a/include/xrpl/basics/TaggedCache.h +++ b/include/xrpl/basics/TaggedCache.h @@ -153,14 +153,15 @@ private: Policy policy, Callback&& replaceCallback = nullptr); - /** canonicalizeImpl variant for callers that already hold `mutex_`. - - The unnamed `scoped_lock const&` parameter is proof of - ownership; this overload does not acquire the lock. Use it from other - methods (e.g. fetchAndModify) that need to compose canonicalize with - additional work under a single critical section, without relying on - recursive-mutex re-entry. - */ + /** + * canonicalizeImpl variant for callers that already hold `mutex_`. + * + * The unnamed `scoped_lock const&` parameter is proof of + * ownership; this overload does not acquire the lock. Use it from other + * methods (e.g. fetchAndModify) that need to compose canonicalize with + * additional work under a single critical section, without relying on + * recursive-mutex re-entry. + */ template bool canonicalizeImpl( @@ -277,17 +278,18 @@ public: fetch(key_type const& digest, Handler const& h); // End CachedSLEs functions. - /** Fetch or create an entry and execute a callback while holding the lock. - - The entry for the given key is fetched from the cache or created if it - doesn't exist. The callback is then invoked with a reference to the - entry while the cache mutex is still held, allowing safe modification - of the cached object. - - @param key The key to fetch or create - @param callback Function to call with the entry under lock. - Signature: void(T&) - */ + /** + * Fetch or create an entry and execute a callback while holding the lock. + * + * The entry for the given key is fetched from the cache or created if it + * doesn't exist. The callback is then invoked with a reference to the + * entry while the cache mutex is still held, allowing safe modification + * of the cached object. + * + * @param key The key to fetch or create + * @param callback Function to call with the entry under lock. + * Signature: void(T&) + */ template void fetchAndModify(key_type const& key, Callback&& callback);