Skip to content

Commit 28e664e

Browse files
committed
Fix build on older macOS deployment targets
Apparently, macOS incorrectly hides this `std::optional.value` method behind the deployment target, even though it's a header-only implementation, so it shouldn't have any runtime requirement. Instead of fiddling with deployment targets, use an alternate method for getting the `std::optional` value.
1 parent 35c1dd2 commit 28e664e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/_path_wrapper.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -301,7 +301,7 @@ Py_cleanup_path(mpl::PathIterator path, agg::trans_affine trans, bool remove_nan
301301
std::vector<npy_uint8> codes;
302302

303303
cleanup_path(path, trans, remove_nans, do_clip, clip_rect, snap_mode, stroke_width,
304-
simplify.value(), return_curves, sketch, vertices, codes);
304+
*simplify, return_curves, sketch, vertices, codes);
305305

306306
auto length = static_cast<py::ssize_t>(codes.size());
307307

@@ -360,8 +360,8 @@ Py_convert_to_string(mpl::PathIterator path, agg::trans_affine trans,
360360
simplify = path.should_simplify();
361361
}
362362

363-
status = convert_to_string(path, trans, cliprect, simplify.value(), sketch,
364-
precision, codes, postfix, buffer);
363+
status = convert_to_string(path, trans, cliprect, *simplify, sketch, precision,
364+
codes, postfix, buffer);
365365

366366
if (!status) {
367367
throw py::value_error("Malformed path codes");

0 commit comments

Comments
 (0)