mirror of
https://github.com/YosysHQ/yosys
synced 2025-09-15 14:11:29 +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
|
@ -85,7 +85,7 @@ struct CoveragePass : public Pass {
|
|||
if (!ofile.empty()) {
|
||||
fout.open(ofile, std::ios::out | std::ios::trunc);
|
||||
if (!fout.is_open())
|
||||
log_error("Could not open file \"%s\" with write access.\n", ofile.c_str());
|
||||
log_error("Could not open file \"%s\" with write access.\n", ofile);
|
||||
}
|
||||
|
||||
std::map<std::string, std::set<int>> uncovered_lines;
|
||||
|
@ -128,7 +128,7 @@ struct CoveragePass : public Pass {
|
|||
for (const auto& file_entry : all_lines) {
|
||||
int lines_found = file_entry.second.size();
|
||||
int lines_hit = file_entry.second.size() - (uncovered_lines.count(file_entry.first) ? uncovered_lines[file_entry.first].size() : 0);
|
||||
log("File %s: %d/%d lines covered\n", file_entry.first.c_str(), lines_hit, lines_found);
|
||||
log("File %s: %d/%d lines covered\n", file_entry.first, lines_hit, lines_found);
|
||||
|
||||
if(!ofile.empty()) {
|
||||
fout << "SF:" << file_entry.first << "\n";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue