From 91d0f254420f9823f920c10db196276abe048de9 Mon Sep 17 00:00:00 2001 From: Wilson Snyder Date: Sat, 11 Nov 2023 20:52:23 -0500 Subject: [PATCH] Internals: Fix style of iterator. No functional change. --- include/verilated_trace_imp.h | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/include/verilated_trace_imp.h b/include/verilated_trace_imp.h index 1bdef1291..f44fab709 100644 --- a/include/verilated_trace_imp.h +++ b/include/verilated_trace_imp.h @@ -328,10 +328,7 @@ void VerilatedTrace::traceInit() VL_MT_UNSAFE { // Call all initialize callbacks, which will: // - Call decl* for each signal (these eventually call ::declCode) // - Store the base code - for (uint32_t i = 0; i < m_initCbs.size(); ++i) { - const CallbackRecord& cbr = m_initCbs[i]; - cbr.m_initCb(cbr.m_userp, self(), nextCode()); - } + for (const CallbackRecord& cbr : m_initCbs) cbr.m_initCb(cbr.m_userp, self(), nextCode()); if (expectedCodes && nextCode() != expectedCodes) { VL_FATAL_MT(__FILE__, __LINE__, "", @@ -614,10 +611,7 @@ void VerilatedTrace::dump(uint64_t timeui) VL_MT_SAFE_EXCLUD } } - for (uint32_t i = 0; i < m_cleanupCbs.size(); ++i) { - const CallbackRecord& cbr = m_cleanupCbs[i]; - cbr.m_cleanupCb(cbr.m_userp, self()); - } + for (const CallbackRecord& cbr : m_cleanupCbs) cbr.m_cleanupCb(cbr.m_userp, self()); if (offload() && VL_LIKELY(bufferp)) { // Mark end of the offload buffer we just filled