Internals: Cleanup some string constructors. No functional change.

This commit is contained in:
Wilson Snyder
2022-08-30 01:02:39 -04:00
parent 6a5f77b278
commit ea55db7286
25 changed files with 80 additions and 73 deletions
+3 -3
View File
@@ -148,9 +148,9 @@ string V3Error::msgPrefix() {
} else if (code == V3ErrorCode::EC_ERROR) {
return "%Error: ";
} else if (isError(code, supp)) {
return "%Error-" + string(code.ascii()) + ": ";
return "%Error-" + std::string{code.ascii()} + ": ";
} else {
return "%Warning-" + string(code.ascii()) + ": ";
return "%Warning-" + std::string{code.ascii()} + ": ";
}
}
@@ -176,7 +176,7 @@ void V3Error::vlAbort() {
void V3Error::suppressThisWarning() {
#ifndef V3ERROR_NO_GLOBAL_
V3Stats::addStatSum(string("Warnings, Suppressed ") + s_errorCode.ascii(), 1);
V3Stats::addStatSum(std::string{"Warnings, Suppressed "} + s_errorCode.ascii(), 1);
#endif
s_errorSuppressed = true;
}