Skip to content

Commit f3ae088

Browse files
committed
Do not use optionalt::value()
std::optional::value() is unavailable in earlier versions of macOS. We generally use operator* already, which always works.
1 parent dd83fb9 commit f3ae088

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/goto-symex/symex_clean_expr.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -90,11 +90,11 @@ process_array_expr(exprt &expr, bool do_simplify, const namespacet &ns)
9090
auto array_size = size_of_expr(expr.type(), ns);
9191
CHECK_RETURN(array_size.has_value());
9292
if(do_simplify)
93-
simplify(array_size.value(), ns);
93+
simplify(*array_size, ns);
9494
expr = make_byte_extract(
9595
expr,
9696
from_integer(0, c_index_type()),
97-
array_typet(char_type(), array_size.value()));
97+
array_typet(char_type(), *array_size));
9898
}
9999

100100
// given an array type T[N], i.e., an array of N elements of type T, and a
@@ -109,7 +109,7 @@ process_array_expr(exprt &expr, bool do_simplify, const namespacet &ns)
109109
auto subtype_size_opt = size_of_expr(subtype, ns);
110110
CHECK_RETURN(subtype_size_opt.has_value());
111111
exprt subtype_size = typecast_exprt::conditional_cast(
112-
subtype_size_opt.value(), array_size_type);
112+
*subtype_size_opt, array_size_type);
113113
new_offset = div_exprt(new_offset, subtype_size);
114114
minus_exprt subtraction{prev_array_type.size(), new_offset};
115115
if_exprt new_size{

0 commit comments

Comments
 (0)