mirror of
https://github.com/YosysHQ/yosys
synced 2025-09-15 22: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:
parent
c2291c10a6
commit
e0ae7b7af4
140 changed files with 623 additions and 623 deletions
|
@ -108,7 +108,7 @@ struct LoggerPass : public Pass {
|
|||
std::string pattern = args[++argidx];
|
||||
if (pattern.front() == '\"' && pattern.back() == '\"') pattern = pattern.substr(1, pattern.size() - 2);
|
||||
try {
|
||||
log("Added regex '%s' for warnings to warn list.\n", pattern.c_str());
|
||||
log("Added regex '%s' for warnings to warn list.\n", pattern);
|
||||
log_warn_regexes.push_back(YS_REGEX_COMPILE(pattern));
|
||||
}
|
||||
catch (const std::regex_error& e) {
|
||||
|
@ -120,7 +120,7 @@ struct LoggerPass : public Pass {
|
|||
std::string pattern = args[++argidx];
|
||||
if (pattern.front() == '\"' && pattern.back() == '\"') pattern = pattern.substr(1, pattern.size() - 2);
|
||||
try {
|
||||
log("Added regex '%s' for warnings to nowarn list.\n", pattern.c_str());
|
||||
log("Added regex '%s' for warnings to nowarn list.\n", pattern);
|
||||
log_nowarn_regexes.push_back(YS_REGEX_COMPILE(pattern));
|
||||
}
|
||||
catch (const std::regex_error& e) {
|
||||
|
@ -132,7 +132,7 @@ struct LoggerPass : public Pass {
|
|||
std::string pattern = args[++argidx];
|
||||
if (pattern.front() == '\"' && pattern.back() == '\"') pattern = pattern.substr(1, pattern.size() - 2);
|
||||
try {
|
||||
log("Added regex '%s' for warnings to werror list.\n", pattern.c_str());
|
||||
log("Added regex '%s' for warnings to werror list.\n", pattern);
|
||||
log_werror_regexes.push_back(YS_REGEX_COMPILE(pattern));
|
||||
}
|
||||
catch (const std::regex_error& e) {
|
||||
|
@ -152,7 +152,7 @@ struct LoggerPass : public Pass {
|
|||
}
|
||||
if (args[argidx] == "-experimental" && argidx+1 < args.size()) {
|
||||
std::string value = args[++argidx];
|
||||
log("Added '%s' experimental ignore list.\n", value.c_str());
|
||||
log("Added '%s' experimental ignore list.\n", value);
|
||||
log_experimentals_ignored.insert(value);
|
||||
continue;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue