Skip to content

Commit

Permalink
Array/vector sizes can be size_t
Browse files Browse the repository at this point in the history
  • Loading branch information
tautschnig committed Jun 6, 2018
1 parent 4031eac commit 60ab7ec
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/util/expr_initializer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ exprt expr_initializert<nondet>::expr_initializer_rec(
array_size >= 0, "array should not have negative size");

array_exprt value(array_type);
value.operands().resize(integer2unsigned(array_size), tmpval);
value.operands().resize(integer2size_t(array_size), tmpval);
value.add_source_location()=source_location;
return value;
}
Expand Down Expand Up @@ -210,7 +210,7 @@ exprt expr_initializert<nondet>::expr_initializer_rec(
vector_size >= 0, "vector should not have negative size");

vector_exprt value(vector_type);
value.operands().resize(integer2unsigned(vector_size), tmpval);
value.operands().resize(integer2size_t(vector_size), tmpval);
value.add_source_location()=source_location;

return value;
Expand Down

0 comments on commit 60ab7ec

Please sign in to comment.