Skip to content

Commit ed86ec5

Browse files
committed
Use new side_effect_exprt constructor
This allows us to construct the expression in one line rather than three.
1 parent daec9b4 commit ed86ec5

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/util/allocate_objects.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -268,8 +268,7 @@ void allocate_objectst::mark_created_symbols_as_input(code_blockt &init_code)
268268

269269
code_assignt make_allocate_code(const symbol_exprt &lhs, const exprt &size)
270270
{
271-
side_effect_exprt alloc(ID_allocate, lhs.type(), lhs.source_location());
272-
alloc.add_to_operands(size);
273-
alloc.add_to_operands(false_exprt());
271+
side_effect_exprt alloc{
272+
ID_allocate, {size, false_exprt()}, lhs.type(), lhs.source_location()};
274273
return code_assignt(lhs, alloc);
275274
}

0 commit comments

Comments
 (0)