Internals: Add const. No functional change.

This commit is contained in:
Wilson Snyder
2021-06-20 18:33:13 -04:00
parent ec4eb18846
commit 512fe0a2d1
87 changed files with 690 additions and 669 deletions
+4 -4
View File
@@ -114,7 +114,7 @@ V3GraphEdge* V3GraphVertex::findConnectingEdgep(GraphWay way, const V3GraphVerte
// O(edges) linear search. Searches search both nodes' edge lists in
// parallel. The lists probably aren't _both_ huge, so this is
// unlikely to blow up even on fairly nasty graphs.
GraphWay inv = way.invert();
const GraphWay inv = way.invert();
V3GraphEdge* aedgep = this->beginp(way);
V3GraphEdge* bedgep = waywardp->beginp(inv);
while (aedgep && bedgep) {
@@ -340,7 +340,7 @@ void V3Graph::dumpDotFile(const string& filename, bool colorAsSubgraph) const {
int n = 0;
string subgr;
for (auto it = subgraphs.cbegin(); it != subgraphs.cend(); ++it) {
string vertexSubgraph = it->first;
const string vertexSubgraph = it->first;
V3GraphVertex* vertexp = it->second;
numMap[vertexp] = n;
if (subgr != vertexSubgraph) {
@@ -366,8 +366,8 @@ void V3Graph::dumpDotFile(const string& filename, bool colorAsSubgraph) const {
for (V3GraphVertex* vertexp = verticesBeginp(); vertexp; vertexp = vertexp->verticesNextp()) {
for (V3GraphEdge* edgep = vertexp->outBeginp(); edgep; edgep = edgep->outNextp()) {
if (edgep->weight()) {
int fromVnum = numMap[edgep->fromp()];
int toVnum = numMap[edgep->top()];
const int fromVnum = numMap[edgep->fromp()];
const int toVnum = numMap[edgep->top()];
*logp << "\tn" << edgep->fromp()->dotName() << fromVnum << " -> n"
<< edgep->top()->dotName() << toVnum
<< " ["