3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2025-08-20 10:10:23 +00:00

Remove some c_str() calls where they're no longer needed as parameters to stringf().

This commit is contained in:
Robert O'Callahan 2025-08-18 03:07:45 +00:00 committed by Lofty
parent f0ccc65820
commit e0e70d1158
5 changed files with 86 additions and 86 deletions

View file

@ -129,7 +129,7 @@ struct BtorWorker
std::replace(src.begin(), src.end(), ' ', '_');
if (srcsymbols.count(src) || module->count_id("\\" + src)) {
for (int i = 1;; i++) {
string s = stringf("%s-%d", src.c_str(), i);
string s = stringf("%s-%d", src, i);
if (!srcsymbols.count(s) && !module->count_id("\\" + s)) {
src = s;
break;
@ -192,7 +192,7 @@ struct BtorWorker
void btorf_push(const string &id)
{
if (verbose) {
f << indent << stringf(" ; begin %s\n", id.c_str());
f << indent << stringf(" ; begin %s\n", id);
indent += " ";
}
}
@ -201,7 +201,7 @@ struct BtorWorker
{
if (verbose) {
indent = indent.substr(4);
f << indent << stringf(" ; end %s\n", id.c_str());
f << indent << stringf(" ; end %s\n", id);
}
}