[osx] We cannot use std::optional::value() if we want to support macOS 10.9

It looks like value() member was introduced in macOS 10.13 (error
detected because we use CMAKE_OSX_DEPLOYMENT_TARGET=10.9).
This commit is contained in:
David Capello 2022-06-09 19:06:16 -03:00
parent 71d885d2a0
commit 4471dab289
2 changed files with 3 additions and 1 deletions

View File

@ -143,6 +143,8 @@ We are using C++17 standard. You can safely use:
* Use `std::shared_ptr`, `std::unique_ptr`, or `base::Ref`
* Use `std::clamp`
* Use `std::optional`
* Use `std::optional::operator*` (because `std::optional::value` isn't
available on macOS 10.9, only since 10.13)
* Use `static constexpr T v = ...;`
* You can use `<atomic>`, `<thread>`, `<mutex>`, and `<condition_variable>`
* Prefer `using T = ...;` instead of `typedef ... T`

View File

@ -636,7 +636,7 @@ bool App::isPortable()
base::get_file_path(base::get_app_path()),
"aseprite.ini"));
}
return is_portable.value();
return *is_portable;
}
tools::ToolBox* App::toolBox() const