diff --git a/src/V3Ast.cpp b/src/V3Ast.cpp index cf13740e2..e952f5493 100644 --- a/src/V3Ast.cpp +++ b/src/V3Ast.cpp @@ -239,7 +239,7 @@ AstNode* AstNode::addNext(AstNode* newp) { UASSERT(newp,"Null item passed to addNext\n"); this->debugTreeChange("-addNextThs: ", __LINE__, false); newp->debugTreeChange("-addNextNew: ", __LINE__, true); - if (this == NULL) { + if (!this) { return (newp); } else { // Find end of old list @@ -754,7 +754,6 @@ void AstNode::iterateAndNext(AstNVisitor& v, AstNUser* vup) { // This is a very hot function // IMPORTANT: If you replace a node that's the target of this iterator, // then the NEW node will be iterated on next, it isn't skipped! - // if (!this) return; // Part of for() // Future versions of this function may require the node to have a back to be iterated; // there's no lower level reason yet though the back must exist. AstNode* nodep=this; diff --git a/src/V3FileLine.cpp b/src/V3FileLine.cpp index 0d8eb9533..181091856 100644 --- a/src/V3FileLine.cpp +++ b/src/V3FileLine.cpp @@ -110,7 +110,7 @@ void FileLine::lineDirective(const char* textp, int& enterExitRef) { const char *ln = textp; while (*textp && !isspace(*textp)) textp++; if (isdigit(*ln)) { - this->lineno(atoi(ln)); + lineno(atoi(ln)); } while (*textp && (isspace(*textp) || *textp=='"')) textp++; @@ -120,7 +120,7 @@ void FileLine::lineDirective(const char* textp, int& enterExitRef) { if (textp != fn) { string strfn = fn; strfn = strfn.substr(0, textp-fn); - this->filename(strfn); + filename(strfn); } // Grab level @@ -229,7 +229,7 @@ void FileLine::modifyStateInherit(const FileLine* fromp) { for (int codei=V3ErrorCode::EC_MIN; codeiwarnIsOff(code)) { - this->warnOff(code, true); + warnOff(code, true); } } } @@ -246,7 +246,7 @@ void FileLine::v3errorEnd(ostringstream& str) { } string FileLine::warnMore() const { - if (this && m_lineno) { + if (m_lineno) { return V3Error::warnMore()+ascii()+": "; } else { return V3Error::warnMore(); diff --git a/src/V3LinkDot.cpp b/src/V3LinkDot.cpp index 5aea0de48..7d93abeb6 100644 --- a/src/V3LinkDot.cpp +++ b/src/V3LinkDot.cpp @@ -2110,7 +2110,7 @@ private: taskp->dpiExport(true); if (nodep->cname()!="") taskp->cname(nodep->cname()); } - nodep->unlinkFrBack()->deleteTree(); + nodep->unlinkFrBack()->deleteTree(); VL_DANGLING(nodep); } virtual void visit(AstPackageImport* nodep, AstNUser*) { // No longer needed