mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2025-12-23 15:52:55 +01:00
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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user