Skip to content

Commit ca00c76

Browse files
committed
Replace deprecated integer2unsigned
Signed-off-by: František Nečas <[email protected]>
1 parent c5de28a commit ca00c76

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/domains/util.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ mp_integer simplify_const_int(const exprt &expr)
227227
if(array_type.id()==ID_signedbv || array_type.id()==ID_unsignedbv)
228228
{
229229
mp_integer mp_index=simplify_const_int(index_expr.index());
230-
unsigned index=integer2unsigned(mp_index); // TODO: might overflow
230+
auto index=numeric_cast_v<unsigned>(mp_index); // TODO: might overflow
231231
assert(index<(index_expr.array().operands().size()));
232232
return simplify_const_int(index_expr.array().operands()[index]);
233233
}
@@ -308,7 +308,7 @@ ieee_floatt simplify_const_float(const exprt &expr)
308308
if(array_type.id()==ID_float)
309309
{
310310
mp_integer mp_index=simplify_const_int(index_expr.index());
311-
unsigned index=integer2unsigned(mp_index); // TODO: might overflow
311+
auto index=numeric_cast_v<unsigned>(mp_index); // TODO: might overflow
312312
assert(index<(index_expr.array().operands().size()));
313313
return simplify_const_float(index_expr.array().operands()[index]);
314314
}

0 commit comments

Comments
 (0)