1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2025-12-23 15:52:55 +01:00

Fix #11550: Use std::nullopt instead of empty brace (#11595)

This is technically a gcc bug from the looks of it but since std::nullopt is slightly easier to read I've gone through the codebase and used that over empty braces. In addition noticed a mistake on the scripting viewport get widgetIndex function where it would return an incorrect widgetIndex.
This commit is contained in:
Duncan
2020-05-02 09:09:12 +01:00
committed by GitHub
parent d78638c17a
commit 32eb7071a1
7 changed files with 9 additions and 9 deletions

View File

@@ -141,7 +141,7 @@ static std::optional<std::string> screenshot_get_next_path()
if (!platform_ensure_directory_exists(screenshotDirectory.c_str()))
{
log_error("Unable to save screenshots in OpenRCT2 screenshot directory.");
return {};
return std::nullopt;
}
auto parkName = screenshot_get_park_name();
@@ -165,7 +165,7 @@ static std::optional<std::string> screenshot_get_next_path()
}
log_error("You have too many saved screenshots saved at exactly the same date and time.");
return {};
return std::nullopt;
};
std::string screenshot_dump_png(rct_drawpixelinfo* dpi)