Skip to content

Commit 339641c

Browse files
committed
Avoid default constructing code_ifthenelset
The default constructor is deprecated.
1 parent 85d61b5 commit 339641c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Diff for: jbmc/src/java_bytecode/java_bytecode_instrument.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,7 @@ code_ifthenelset java_bytecode_instrumentt::check_class_cast(
229229
if(null_check_op.type()!=voidptr)
230230
null_check_op.make_typecast(voidptr);
231231

232-
codet check_code;
232+
optionalt<codet> check_code;
233233
if(throw_runtime_exceptions)
234234
{
235235
check_code=
@@ -251,7 +251,7 @@ code_ifthenelset java_bytecode_instrumentt::check_class_cast(
251251

252252
return code_ifthenelset(
253253
notequal_exprt(std::move(null_check_op), null_pointer_exprt(voidptr)),
254-
std::move(check_code));
254+
std::move(*check_code));
255255
}
256256

257257
/// Checks whether \p expr is null and throws NullPointerException/

0 commit comments

Comments
 (0)