Internal: cppcheck fixes. No functional change intended.

This commit is contained in:
Wilson Snyder
2022-11-27 05:52:40 -05:00
parent 4b3731d318
commit 833780fac1
40 changed files with 175 additions and 121 deletions
+3 -2
View File
@@ -89,7 +89,7 @@ class SplitIntoComponents final {
}
}
SplitIntoComponents(DfgGraph& dfg, std::string label)
SplitIntoComponents(DfgGraph& dfg, const std::string& label)
: m_dfg{dfg}
, m_prefix{dfg.name() + (label.empty() ? "" : "-") + label + "-component-"} {
// Component number is stored as DfgVertex::user<size_t>()
@@ -356,6 +356,7 @@ class ExtractCyclicComponents final {
// Unlink the source edge (source is reconnected by 'relink'
edge.unlinkSource();
// Apply the fixup
// cppcheck-has-bug-suppress constVariable
DfgVertexVar& clone = getClone(vtx, sourceComponent);
relink(*(clone.as<T_Vertex>()), source, idx);
});
@@ -517,7 +518,7 @@ class ExtractCyclicComponents final {
}
// CONSTRUCTOR - entry point
explicit ExtractCyclicComponents(DfgGraph& dfg, std::string label)
explicit ExtractCyclicComponents(DfgGraph& dfg, const std::string& label)
: m_dfg{dfg}
, m_prefix{dfg.name() + (label.empty() ? "" : "-") + label + "-component-"} {
// VertexState is stored as user data