diff --git a/src/os/windows/win32.cpp b/src/os/windows/win32.cpp index ba4e2aa539..2e005d2e9b 100644 --- a/src/os/windows/win32.cpp +++ b/src/os/windows/win32.cpp @@ -407,7 +407,7 @@ std::optional GetCurrentLocale(const char *) if (GetLocaleInfoA(userUiLocale, LOCALE_SISO639LANGNAME, lang, static_cast(std::size(lang))) == 0 || GetLocaleInfoA(userUiLocale, LOCALE_SISO3166CTRYNAME, country, static_cast(std::size(country))) == 0) { /* Unable to retrieve the locale. */ - return nullptr; + return std::nullopt; } /* Format it as 'en_us'. */ return fmt::format("{}_{}", std::string_view{lang, 2}, std::string_view{country, 2}); diff --git a/src/video/cocoa/cocoa_wnd.mm b/src/video/cocoa/cocoa_wnd.mm index 99e3dc3f3b..43f8ee266b 100644 --- a/src/video/cocoa/cocoa_wnd.mm +++ b/src/video/cocoa/cocoa_wnd.mm @@ -401,7 +401,7 @@ void CocoaDialog(std::string_view title, std::string_view message, std::string_v bool wasstarted = _cocoa_video_started; if (VideoDriver::GetInstance() == nullptr) { CocoaSetupApplication(); // Setup application before showing dialog - } else if (!_cocoa_video_started && VideoDriver::GetInstance()->Start({}) != nullptr) { + } else if (!_cocoa_video_started && VideoDriver::GetInstance()->Start({}).has_value()) { fmt::print(stderr, "{}: {}\n", title, message); return; }