3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2025-10-03 22:43:57 +00:00

Fix subcircuit building without #define _YOSYS_

We can't use the new stringf functionality with `my_sprintf()` since in some builds
that falls back to C-style varargs.
This commit is contained in:
Robert O'Callahan 2025-09-15 23:13:20 +00:00
parent fa02d71f65
commit 9cb3a239cc

View file

@ -411,7 +411,7 @@ class SubCircuit::SolverWorker
std::string toString() const
{
return my_stringf("%s[%d]:%s[%d]", fromPort, fromBit, toPort, toBit);
return my_stringf("%s[%d]:%s[%d]", fromPort.c_str(), fromBit, toPort.c_str(), toBit);
}
};
@ -444,7 +444,7 @@ class SubCircuit::SolverWorker
std::string str;
bool firstPort = true;
for (const auto &it : portSizes) {
str += my_stringf("%s%s[%d]", firstPort ? "" : ",", it.first, it.second);
str += my_stringf("%s%s[%d]", firstPort ? "" : ",", it.first.c_str(), it.second);
firstPort = false;
}
return typeId + "(" + str + ")";