From b699325a77af12f0257da96fb476188a5e9e5380 Mon Sep 17 00:00:00 2001 From: Zygo Blaxell Date: Sat, 19 Nov 2022 02:38:49 -0500 Subject: [PATCH] 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 --- lib/bytevector.cc | 2 -- 1 file changed, 2 deletions(-) diff --git a/lib/bytevector.cc b/lib/bytevector.cc index 8895f30..1acbed3 100644 --- a/lib/bytevector.cc +++ b/lib/bytevector.cc @@ -26,14 +26,12 @@ namespace crucible { size_t ByteVector::size() const { - unique_lock lock(m_mutex); return m_size; } bool ByteVector::empty() const { - unique_lock lock(m_mutex); return !m_ptr || !m_size; }