Internals: Cleanup temp string inserts for clang-tidy. No functional change.

This commit is contained in:
Wilson Snyder
2018-10-14 11:10:11 -04:00
parent 595419b370
commit b7e4083e70
7 changed files with 12 additions and 7 deletions
+3 -3
View File
@@ -818,7 +818,7 @@ int V3PreProcImp::getRawToken() {
static string rtncmt; // Keep the c string till next call
rtncmt = m_lineCmt;
if (m_lineCmtNl) {
if (!m_rawAtBol) rtncmt = "\n"+rtncmt;
if (!m_rawAtBol) rtncmt.insert(0, "\n");
m_lineCmtNl = false;
}
yyourtext(rtncmt.c_str(), rtncmt.length());
@@ -1099,7 +1099,7 @@ int V3PreProcImp::getStateToken() {
if (state() == ps_JOIN) { // Handle {left}```FOO(ARG) where `FOO(ARG) might be empty
if (m_joinStack.empty()) fatalSrc("`` join stack empty, but in a ``");
string lhs = m_joinStack.top(); m_joinStack.pop();
out = lhs+out;
out.insert(0, lhs);
UINFO(5,"``-end-defarg Out:"<<out<<endl);
statePop();
}
@@ -1323,7 +1323,7 @@ int V3PreProcImp::getStateToken() {
if (state() == ps_JOIN) { // Handle {left}```FOO where `FOO might be empty
if (m_joinStack.empty()) fatalSrc("`` join stack empty, but in a ``");
string lhs = m_joinStack.top(); m_joinStack.pop();
out = lhs+out;
out.insert(0, lhs);
UINFO(5,"``-end-defref Out:"<<out<<endl);
statePop();
}