From de9c92fd14dbb8d152e3699a6963365f34fcc32a Mon Sep 17 00:00:00 2001 From: Wilson Snyder Date: Sat, 19 Nov 2022 10:48:46 -0500 Subject: [PATCH] Internals: Add missing const. No functional change. --- src/V3Randomize.cpp | 2 +- src/V3StatsReport.cpp | 2 +- src/V3VariableOrder.cpp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/V3Randomize.cpp b/src/V3Randomize.cpp index e912f5e90..99ade5062 100644 --- a/src/V3Randomize.cpp +++ b/src/V3Randomize.cpp @@ -126,7 +126,7 @@ private: // STATE AstNodeModule* m_modp = nullptr; // Current module - AstNodeFTask* m_ftaskp = nullptr; // Current function/task + const AstNodeFTask* m_ftaskp = nullptr; // Current function/task size_t m_enumValueTabCount = 0; // Number of tables with enum values created int m_randCaseNum = 0; // Randcase number within a module for var naming diff --git a/src/V3StatsReport.cpp b/src/V3StatsReport.cpp index 03be5d71c..0135bd547 100644 --- a/src/V3StatsReport.cpp +++ b/src/V3StatsReport.cpp @@ -228,7 +228,7 @@ void V3Stats::statsReport() { std::ofstream* ofp{V3File::new_ofstream(filename)}; if (ofp->fail()) v3fatal("Can't write " << filename); - const StatsReport reporter(ofp); + { StatsReport{ofp}; } // Destruct before cleanup // Cleanup ofp->close(); diff --git a/src/V3VariableOrder.cpp b/src/V3VariableOrder.cpp index 562bc7225..6ebd72c87 100644 --- a/src/V3VariableOrder.cpp +++ b/src/V3VariableOrder.cpp @@ -118,7 +118,7 @@ class VariableOrder final { V3TSP::StateVec states; for (const auto& pair : m2v) { if (pair.first.empty()) continue; - states.push_back(new VarTspSorter(pair.first)); + states.push_back(new VarTspSorter{pair.first}); } // Do the TSP sort