From 90e049c6741de452e0a1dba2b94808bf4cbae7ea Mon Sep 17 00:00:00 2001 From: Wilson Snyder Date: Sat, 1 Apr 2023 11:46:43 -0400 Subject: [PATCH] Internals: Remove unneeded variable. No functional change. --- include/verilated_types.h | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/include/verilated_types.h b/include/verilated_types.h index d506a54d6..469852b98 100644 --- a/include/verilated_types.h +++ b/include/verilated_types.h @@ -395,18 +395,17 @@ public: // Can't just overload operator[] or provide a "at" reference to set, // because we need to be able to insert only when the value is set T_Value& at(int32_t index) { - static thread_local T_Value s_throwAway; + static thread_local T_Value t_throwAway; // Needs to work for dynamic arrays, so does not use T_MaxSize if (VL_UNLIKELY(index < 0 || index >= m_deque.size())) { - s_throwAway = atDefault(); - return s_throwAway; + t_throwAway = atDefault(); + return t_throwAway; } else { return m_deque[index]; } } // Accessing. Verilog: v = assoc[index] const T_Value& at(int32_t index) const { - static thread_local T_Value s_throwAway; // Needs to work for dynamic arrays, so does not use T_MaxSize if (VL_UNLIKELY(index < 0 || index >= m_deque.size())) { return atDefault();