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
+3 -3
View File
@@ -48,16 +48,16 @@ private:
void rename(AstNode* nodep, bool addPvt) {
if (!nodep->user1()) { // Not already done
if (addPvt) {
string newname = string("__PVT__") + nodep->name();
const string newname = string("__PVT__") + nodep->name();
nodep->name(newname);
nodep->editCountInc();
} else if (VN_IS(nodep, CFunc) && VN_CAST(nodep, CFunc)->isConstructor()) {
} else {
string rsvd = V3LanguageWords::isKeyword(nodep->name());
const string rsvd = V3LanguageWords::isKeyword(nodep->name());
if (rsvd != "") {
nodep->v3warn(SYMRSVDWORD,
"Symbol matches " + rsvd + ": " << nodep->prettyNameQ());
string newname = string("__SYM__") + nodep->name();
const string newname = string("__SYM__") + nodep->name();
nodep->name(newname);
nodep->editCountInc();
}