From cf4b5417c90355c5e27a4cc9bbd4fd9676698044 Mon Sep 17 00:00:00 2001 From: Zygo Blaxell Date: Fri, 28 May 2021 02:11:51 -0400 Subject: [PATCH] context: remove unnecessary copies These were added while debugging a crash that was fixed years ago. Signed-off-by: Zygo Blaxell --- src/bees-context.cc | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/bees-context.cc b/src/bees-context.cc index 7e96252..f279a2c 100644 --- a/src/bees-context.cc +++ b/src/bees-context.cc @@ -1125,8 +1125,7 @@ BeesContext::fd_cache() if (!m_fd_cache) { m_fd_cache = make_shared(shared_from_this()); } - auto rv = m_fd_cache; - return rv; + return m_fd_cache; } shared_ptr @@ -1139,8 +1138,7 @@ BeesContext::roots() if (!m_roots) { m_roots = make_shared(shared_from_this()); } - auto rv = m_roots; - return rv; + return m_roots; } shared_ptr @@ -1153,8 +1151,7 @@ BeesContext::hash_table() if (!m_hash_table) { m_hash_table = make_shared(shared_from_this(), "beeshash.dat"); } - auto rv = m_hash_table; - return rv; + return m_hash_table; } void