mirror of
https://github.com/YosysHQ/yosys
synced 2025-11-03 13:07:58 +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:
parent
c2291c10a6
commit
e0ae7b7af4
140 changed files with 623 additions and 623 deletions
|
|
@ -242,7 +242,7 @@ struct arg_map_t
|
|||
void add_arg(const std::string &name, const char *default_value)
|
||||
{
|
||||
if (find(name)) {
|
||||
log_error("Duplicate macro arguments with name `%s'.\n", name.c_str());
|
||||
log_error("Duplicate macro arguments with name `%s'.\n", name);
|
||||
}
|
||||
|
||||
name_to_pos[name] = args.size();
|
||||
|
|
@ -789,14 +789,14 @@ frontend_verilog_preproc(std::istream &f,
|
|||
else if (ifdef_pass_level > 0)
|
||||
ifdef_pass_level--;
|
||||
else
|
||||
log_error("Found %s outside of macro conditional branch!\n", tok.c_str());
|
||||
log_error("Found %s outside of macro conditional branch!\n", tok);
|
||||
continue;
|
||||
}
|
||||
|
||||
if (tok == "`else") {
|
||||
if (ifdef_fail_level == 0) {
|
||||
if (ifdef_pass_level == 0)
|
||||
log_error("Found %s outside of macro conditional branch!\n", tok.c_str());
|
||||
log_error("Found %s outside of macro conditional branch!\n", tok);
|
||||
ifdef_pass_level--;
|
||||
ifdef_fail_level = 1;
|
||||
ifdef_already_satisfied = true;
|
||||
|
|
@ -813,7 +813,7 @@ frontend_verilog_preproc(std::istream &f,
|
|||
std::string name = next_token(true);
|
||||
if (ifdef_fail_level == 0) {
|
||||
if (ifdef_pass_level == 0)
|
||||
log_error("Found %s outside of macro conditional branch!\n", tok.c_str());
|
||||
log_error("Found %s outside of macro conditional branch!\n", tok);
|
||||
ifdef_pass_level--;
|
||||
ifdef_fail_level = 1;
|
||||
ifdef_already_satisfied = true;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue