Internals: Use C++14 quoted literal std::string

This commit is contained in:
Wilson Snyder
2024-01-28 21:00:20 -05:00
parent eecdf4b0f3
commit 22687a6901
38 changed files with 92 additions and 107 deletions
+2 -2
View File
@@ -45,7 +45,7 @@ class NameVisitor final : public VNVisitorConst {
void rename(AstNode* nodep, bool addPvt) {
if (!nodep->user1()) { // Not already done
if (addPvt) {
const string newname = std::string{"__PVT__"} + nodep->name();
const string newname = "__PVT__"s + nodep->name();
nodep->name(newname);
nodep->editCountInc();
} else if (VN_IS(nodep, CFunc) && VN_AS(nodep, CFunc)->isConstructor()) {
@@ -54,7 +54,7 @@ class NameVisitor final : public VNVisitorConst {
if (rsvd != "") {
nodep->v3warn(SYMRSVDWORD,
"Symbol matches " + rsvd + ": " << nodep->prettyNameQ());
const string newname = std::string{"__SYM__"} + nodep->name();
const string newname = "__SYM__"s + nodep->name();
nodep->name(newname);
nodep->editCountInc();
}