From ec5e0bea58b1ac851de07e066fc137afb5750d4f Mon Sep 17 00:00:00 2001 From: Michael Tautschnig Date: Thu, 1 Nov 2018 12:13:21 +0000 Subject: [PATCH] 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. --- src/util/expr.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/util/expr.cpp b/src/util/expr.cpp index f36fc78df93..c2e78041949 100644 --- a/src/util/expr.cpp +++ b/src/util/expr.cpp @@ -104,8 +104,7 @@ void exprt::make_not() } else { - new_expr=exprt(ID_not, type()); - new_expr.move_to_operands(*this); + new_expr = not_exprt(*this); } swap(new_expr);