C++: Don't use optional::value

It is not available when targetting older macOs since it can throw an
exception that needs library support
This commit is contained in:
Olivier Goffart 2023-10-11 07:56:42 +02:00
parent 0fabba49ec
commit 347b2d0fbf

View file

@ -459,7 +459,7 @@ inline void set_platform(std::unique_ptr<Platform> platform)
bool status = maybe_clipboard.has_value();
if (status)
*out_text = maybe_clipboard.value();
*out_text = *maybe_clipboard;
return status;
},
[](void *p) { return reinterpret_cast<Platform *>(p)->run_event_loop(); },