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:
parent
a59d89ea81
commit
b699325a77
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user