1
0
mirror of https://github.com/Zygo/bees.git synced 2025-05-18 05:45:45 +02:00

bytevector: don't need _all_ of those mutexes

Methods that don't even look at the pointer don't need a mutex.

Signed-off-by: Zygo Blaxell <bees@furryterror.org>
This commit is contained in:
Zygo Blaxell 2022-11-19 02:38:49 -05:00
parent a59d89ea81
commit b699325a77

View File

@ -26,14 +26,12 @@ namespace crucible {
size_t size_t
ByteVector::size() const ByteVector::size() const
{ {
unique_lock<mutex> lock(m_mutex);
return m_size; return m_size;
} }
bool bool
ByteVector::empty() const ByteVector::empty() const
{ {
unique_lock<mutex> lock(m_mutex);
return !m_ptr || !m_size; return !m_ptr || !m_size;
} }