1
0
Mirror von https://github.com/tkuschel/bees.git synchronisiert 2026-05-08 04:59:37 +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>
Dieser Commit ist enthalten in:
Zygo Blaxell
2022-11-19 02:38:49 -05:00
Ursprung a59d89ea81
Commit b699325a77
-2
Datei anzeigen
@@ -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;
}