mirror of
https://github.com/verilator/verilator.git
synced 2025-01-08 23:57:35 +00:00
Internals: Remove unneeded variable. No functional change.
This commit is contained in:
parent
69121633cf
commit
90e049c674
@ -395,18 +395,17 @@ public:
|
|||||||
// Can't just overload operator[] or provide a "at" reference to set,
|
// 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
|
// because we need to be able to insert only when the value is set
|
||||||
T_Value& at(int32_t index) {
|
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
|
// Needs to work for dynamic arrays, so does not use T_MaxSize
|
||||||
if (VL_UNLIKELY(index < 0 || index >= m_deque.size())) {
|
if (VL_UNLIKELY(index < 0 || index >= m_deque.size())) {
|
||||||
s_throwAway = atDefault();
|
t_throwAway = atDefault();
|
||||||
return s_throwAway;
|
return t_throwAway;
|
||||||
} else {
|
} else {
|
||||||
return m_deque[index];
|
return m_deque[index];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Accessing. Verilog: v = assoc[index]
|
// Accessing. Verilog: v = assoc[index]
|
||||||
const T_Value& at(int32_t index) const {
|
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
|
// Needs to work for dynamic arrays, so does not use T_MaxSize
|
||||||
if (VL_UNLIKELY(index < 0 || index >= m_deque.size())) {
|
if (VL_UNLIKELY(index < 0 || index >= m_deque.size())) {
|
||||||
return atDefault();
|
return atDefault();
|
||||||
|
Loading…
Reference in New Issue
Block a user