Fix std::optional value() build error on older macOS SDK

For old macOS (pre 10.14), std::optional does not have .value() method, so the code is using operator*() instead.
This commit is contained in:
YuSanka 2023-02-06 15:13:04 +01:00
parent 917c9ad47b
commit 8b3ff9b9c4
5 changed files with 12 additions and 12 deletions

View file

@ -1194,7 +1194,7 @@ static wxString get_string_value(std::string opt_key, const DynamicPrintConfig&
}
case coEnum: {
auto opt = config.option_def(opt_key)->enum_def->enum_to_label(config.option(opt_key)->getInt());
return opt.has_value() ? _(wxString::FromUTF8(opt.value())) : _L("Undef");
return opt.has_value() ? _(from_u8(*opt)) : _L("Undef");
}
case coPoints: {
if (opt_key == "bed_shape") {