Skip to content

Commit ec5e0be

Browse files
committed
Do not use exprt::move_to_operands as it is marked as deprecated
expr.cpp should not be using methods marked as deprecated in its own header file. This change furthermore increases type safety as the constructor of `not_exprt` will check that the type of the operand is ID_bool.
1 parent 25d5bff commit ec5e0be

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/util/expr.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,8 +104,7 @@ void exprt::make_not()
104104
}
105105
else
106106
{
107-
new_expr=exprt(ID_not, type());
108-
new_expr.move_to_operands(*this);
107+
new_expr = not_exprt(*this);
109108
}
110109

111110
swap(new_expr);

0 commit comments

Comments
 (0)