3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2025-06-21 21:33:40 +00:00

Reduce comparisons of size_t and int

`Const::size()` returns int, so change iterators that use it to `auto` instead of `size_t`.
For cases where size is being explicitly cast to `int`, use the wrapper that we already have instead: `Yosys::GetSize()`.
This commit is contained in:
Krystine Sherwin 2024-11-29 12:31:34 +13:00
parent 6f3376cbe6
commit 1de5d98ae2
No known key found for this signature in database
9 changed files with 59 additions and 59 deletions

View file

@ -984,7 +984,7 @@ void AstNode::detectSignWidthWorker(int &width_hint, bool &sign_hint, bool *foun
// unallocated enum, ignore
break;
case AST_CONSTANT:
width_hint = max(width_hint, int(bits.size()));
width_hint = max(width_hint, GetSize(bits));
if (!is_signed)
sign_hint = false;
break;