Internals: Upgrade some C strings to C++

This commit is contained in:
Wilson Snyder
2015-11-10 18:59:48 -05:00
parent 9208c87f91
commit 0cb5d5cc5a
7 changed files with 16 additions and 20 deletions
+1 -2
View File
@@ -409,9 +409,8 @@ string V3Number::ascii(bool prefixed, bool cleanVerilog) const {
string V3Number::quoteNameControls(const string& namein) {
// Encode control chars into C style escapes
// Reverse is V3Parse::deQuote
const char* start = namein.c_str();
string out;
for (const char* pos = start; *pos; pos++) {
for (string::const_iterator pos=namein.begin(); pos!=namein.end(); ++pos) {
if (pos[0]=='\\' || pos[0]=='"') {
out += string("\\")+pos[0];
} else if (pos[0]=='\n') {