Internals: Cleanup some V3Graph constructors/funcs and docs. No functional change.

This commit is contained in:
Wilson Snyder
2023-10-28 20:11:28 -04:00
parent e708670f9a
commit 7ba6647c4f
11 changed files with 50 additions and 32 deletions
+3 -2
View File
@@ -266,7 +266,7 @@ void V3Graph::loopsVertexCb(V3GraphVertex* vertexp) {
if (debug()) std::cerr << "-Info-Loop: " << cvtToHex(vertexp) << " " << vertexp << endl;
}
void V3Graph::dump(std::ostream& os) {
void V3Graph::dump(std::ostream& os) const {
// This generates a file used by graphviz, https://www.graphviz.org
os << " Graph:\n";
// Print vertices
@@ -284,7 +284,8 @@ void V3Graph::dump(std::ostream& os) {
}
}
void V3Graph::dumpEdge(std::ostream& os, const V3GraphVertex* vertexp, const V3GraphEdge* edgep) {
void V3Graph::dumpEdge(std::ostream& os, const V3GraphVertex* vertexp,
const V3GraphEdge* edgep) const {
if (edgep->weight() && (edgep->fromp() == vertexp || edgep->top() == vertexp)) {
os << "\t\t";
if (edgep->fromp() == vertexp) os << "-> " << edgep->top()->name();