Format all C++ and Java code via clang-format

Signed-off-by: Konstantin Pastbin <konstantin.pastbin@gmail.com>
This commit is contained in:
Konstantin Pastbin
2025-08-17 14:32:37 +07:00
parent 9f0290c0ec
commit bfffa1fff4
2169 changed files with 56441 additions and 64188 deletions

View File

@@ -15,20 +15,18 @@
#pragma clang diagnostic pop
#endif
template<class Key, class Value, class HashContainer = std::unordered_map<Key, Value>>
template <class Key, class Value, class HashContainer = std::unordered_map<Key, Value>>
class FifoCache
{
template <typename K, typename V> friend class FifoCacheTest;
template <typename K, typename V>
friend class FifoCacheTest;
public:
using Loader = std::function<void(Key const & key, Value & value)>;
/// \param capacity maximum size of the cache in number of items.
/// \param loader Function which is called if it's necessary to load a new item for the cache.
FifoCache(size_t capacity, Loader const & loader)
: m_fifo(capacity), m_capacity(capacity), m_loader(loader)
{
}
FifoCache(size_t capacity, Loader const & loader) : m_fifo(capacity), m_capacity(capacity), m_loader(loader) {}
/// \brief Loads value, if it's necessary, by |key| with |m_loader|, puts it to cache and
/// returns the reference to the value to |m_map|.