Skip to content

Commit

Permalink
Make LruCache::exists const
Browse files Browse the repository at this point in the history
  • Loading branch information
bog-dan-ro committed Jan 27, 2024
1 parent 89c8611 commit 36191c4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions include/dracon/utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ class SpinLock
m_lock.clear(std::memory_order_release);
}

inline bool tryLock()
inline bool tryLock() noexcept
{
return !m_lock.test_and_set(std::memory_order_acquire);
}
Expand Down Expand Up @@ -193,7 +193,7 @@ class LruCache
return it->second->second;
}

inline bool exists(const K &key)
inline bool exists(const K &key) const
{
return m_cacheHash.find(key) != m_cacheHash.end();
}
Expand Down

0 comments on commit 36191c4

Please sign in to comment.