3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2025-09-17 23:21:30 +00:00

Remove .c_str() calls from log()/log_error()

There are some leftovers, but this is an easy regex-based approach that removes most of them.
This commit is contained in:
Robert O'Callahan 2025-09-11 05:25:26 +00:00
parent c2291c10a6
commit e0ae7b7af4
140 changed files with 623 additions and 623 deletions

View file

@ -10,7 +10,7 @@ struct MyPass : public Pass {
{
log("Arguments to my_cmd:\n");
for (auto &arg : args)
log(" %s\n", arg.c_str());
log(" %s\n", arg);
log("Modules in current design:\n");
for (auto mod : design->modules())

View file

@ -16,7 +16,7 @@ struct FunctionalDummyBackend : public Backend {
for (auto module : design->selected_modules())
{
log("Processing module `%s`.\n", module->name.c_str());
log("Processing module `%s`.\n", module->name);
// convert module to FunctionalIR
auto ir = Functional::IR::from_module(module);

View file

@ -45,9 +45,9 @@ creates a bijective map from ``K`` to the integers. For example:
log("%d\n", si("world")); // will print 43
log("%d\n", si.at("world")); // will print 43
log("%d\n", si.at("dummy")); // will throw exception
log("%s\n", si[42].c_str())); // will print hello
log("%s\n", si[43].c_str())); // will print world
log("%s\n", si[44].c_str())); // will throw exception
log("%s\n", si[42])); // will print hello
log("%s\n", si[43])); // will print world
log("%s\n", si[44])); // will throw exception
It is not possible to remove elements from an idict.