C++11: Use nullptr. No functional change.

This commit is contained in:
Wilson Snyder
2020-08-16 11:44:05 -04:00
parent 7c54a451a9
commit c0127599df
175 changed files with 2072 additions and 2036 deletions
+8 -8
View File
@@ -36,7 +36,7 @@ V3GraphVertex::V3GraphVertex(V3Graph* graphp, const V3GraphVertex& old)
: m_fanout(old.m_fanout)
, m_color(old.m_color)
, m_rank(old.m_rank) {
m_userp = NULL;
m_userp = nullptr;
verticesPushBack(graphp);
}
@@ -44,7 +44,7 @@ V3GraphVertex::V3GraphVertex(V3Graph* graphp)
: m_fanout(0)
, m_color(0)
, m_rank(0) {
m_userp = NULL;
m_userp = nullptr;
verticesPushBack(graphp);
}
@@ -71,7 +71,7 @@ void V3GraphVertex::unlinkDelete(V3Graph* graphp) {
// Unlink from vertex list
m_vertices.unlink(graphp->m_vertices, this);
// Delete
delete this; // this=NULL;
delete this; // this=nullptr;
}
void V3GraphVertex::rerouteEdges(V3Graph* graphp) {
@@ -123,7 +123,7 @@ V3GraphEdge* V3GraphVertex::findConnectingEdgep(GraphWay way, const V3GraphVerte
aedgep = aedgep->nextp(way);
bedgep = bedgep->nextp(inv);
}
return NULL;
return nullptr;
}
void V3GraphVertex::v3errorEnd(std::ostringstream& str) const {
@@ -165,7 +165,7 @@ void V3GraphEdge::init(V3Graph* graphp, V3GraphVertex* fromp, V3GraphVertex* top
m_top = top;
m_weight = weight;
m_cutable = cutable;
m_userp = NULL;
m_userp = nullptr;
// Link vertices to this edge
outPushBack();
inPushBack();
@@ -185,7 +185,7 @@ void V3GraphEdge::unlinkDelete() {
// Unlink to side
m_ins.unlink(m_top->m_ins, this);
// Delete
delete this; // this=NULL;
delete this; // this=nullptr;
}
void V3GraphEdge::outPushBack() {
@@ -239,7 +239,7 @@ void V3Graph::userClearVertices() {
// down more than help.
for (V3GraphVertex* vertexp = verticesBeginp(); vertexp; vertexp = vertexp->verticesNextp()) {
vertexp->user(0);
vertexp->userp(NULL); // Its a union, but might be different size than user()
vertexp->userp(nullptr); // Its a union, but might be different size than user()
}
}
@@ -248,7 +248,7 @@ void V3Graph::userClearEdges() {
for (V3GraphVertex* vertexp = verticesBeginp(); vertexp; vertexp = vertexp->verticesNextp()) {
for (V3GraphEdge* edgep = vertexp->outBeginp(); edgep; edgep = edgep->outNextp()) {
edgep->user(0);
edgep->userp(NULL); // Its a union, but might be different size than user()
edgep->userp(nullptr); // Its a union, but might be different size than user()
}
}
}