1
0
mirror of https://github.com/Zygo/bees.git synced 2025-05-17 21:35: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
ByteVector::size() const
{
unique_lock<mutex> lock(m_mutex);
return m_size;
}
bool
ByteVector::empty() const
{
unique_lock<mutex> lock(m_mutex);
return !m_ptr || !m_size;
}