From d276529d46c747b1ba8c4b5f038067f6264c5ee2 Mon Sep 17 00:00:00 2001 From: Robert O'Callahan Date: Tue, 16 Sep 2025 23:06:28 +0000 Subject: [PATCH] Remove .c_str() calls from parameters to log_file_info() --- frontends/ast/genrtlil.cc | 2 +- frontends/ast/simplify.cc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/frontends/ast/genrtlil.cc b/frontends/ast/genrtlil.cc index 84f2f9d73..7518e4a3e 100644 --- a/frontends/ast/genrtlil.cc +++ b/frontends/ast/genrtlil.cc @@ -2195,7 +2195,7 @@ RTLIL::SigSpec AstNode::genRTLIL(int width_hint, bool sign_hint) int sz = children.size(); if (str == "$info") { if (sz > 0) - log_file_info(*location.begin.filename, location.begin.line, "%s.\n", children[0]->str.c_str()); + log_file_info(*location.begin.filename, location.begin.line, "%s.\n", children[0]->str); else log_file_info(*location.begin.filename, location.begin.line, "\n"); } else if (str == "$warning") { diff --git a/frontends/ast/simplify.cc b/frontends/ast/simplify.cc index d4e78b730..d249bc8ad 100644 --- a/frontends/ast/simplify.cc +++ b/frontends/ast/simplify.cc @@ -161,7 +161,7 @@ Fmt AstNode::processFormat(int stage, bool sformat_like, int default_base, size_ arg.sig = node_arg->bitsAsConst(); arg.signed_ = node_arg->is_signed; } else if (may_fail) { - log_file_info(*location.begin.filename, location.begin.line, "Skipping system task `%s' with non-constant argument at position %zu.\n", str.c_str(), index + 1); + log_file_info(*location.begin.filename, location.begin.line, "Skipping system task `%s' with non-constant argument at position %zu.\n", str, index + 1); return Fmt(); } else { log_file_error(*location.begin.filename, location.begin.line, "Failed to evaluate system task `%s' with non-constant argument at position %zu.\n", str, index + 1);