mirror of
https://github.com/YosysHQ/yosys
synced 2025-09-30 13:19:05 +00:00
Remove some unnecessary .c_str() calls to the result of unescape_id()
This commit is contained in:
parent
d276529d46
commit
a1141f1a4c
3 changed files with 20 additions and 20 deletions
|
@ -1241,7 +1241,7 @@ void AstNode::detectSignWidthWorker(int &width_hint, bool &sign_hint, bool *foun
|
|||
while (children[0]->simplify(true, 1, -1, false) == true) { }
|
||||
if (children[0]->type != AST_CONSTANT)
|
||||
input_error("System function %s called with non-const argument!\n",
|
||||
RTLIL::unescape_id(str).c_str());
|
||||
RTLIL::unescape_id(str));
|
||||
width_hint = max(width_hint, int(children[0]->asInt(true)));
|
||||
}
|
||||
break;
|
||||
|
@ -1291,7 +1291,7 @@ void AstNode::detectSignWidthWorker(int &width_hint, bool &sign_hint, bool *foun
|
|||
while (right->simplify(true, 1, -1, false)) { }
|
||||
if (left->type != AST_CONSTANT || right->type != AST_CONSTANT)
|
||||
input_error("Function %s has non-constant width!",
|
||||
RTLIL::unescape_id(str).c_str());
|
||||
RTLIL::unescape_id(str));
|
||||
result_width = abs(int(left->asInt(true) - right->asInt(true)));
|
||||
}
|
||||
width_hint = max(width_hint, result_width);
|
||||
|
@ -2237,12 +2237,12 @@ RTLIL::SigSpec AstNode::genRTLIL(int width_hint, bool sign_hint)
|
|||
|
||||
if (GetSize(children) > 1)
|
||||
input_error("System function %s got %d arguments, expected 1 or 0.\n",
|
||||
RTLIL::unescape_id(str).c_str(), GetSize(children));
|
||||
RTLIL::unescape_id(str), GetSize(children));
|
||||
|
||||
if (GetSize(children) == 1) {
|
||||
if (children[0]->type != AST_CONSTANT)
|
||||
input_error("System function %s called with non-const argument!\n",
|
||||
RTLIL::unescape_id(str).c_str());
|
||||
RTLIL::unescape_id(str));
|
||||
width = children[0]->asInt(true);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue