1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-20 05:23:04 +01:00

return nullopt instead of {}

This commit is contained in:
Hielke Morsink
2021-09-13 23:24:57 +02:00
parent 7dd90b99d6
commit cf78d6841d
3 changed files with 6 additions and 6 deletions

View File

@@ -234,7 +234,7 @@ std::optional<ShortcutInput> ShortcutManager::ConvertLegacyBinding(uint16_t bind
if (binding == nullBinding)
{
return {};
return std::nullopt;
}
else
{

View File

@@ -248,7 +248,7 @@ namespace OpenRCT2::Scripting
return i;
}
}
return {};
return std::nullopt;
}
};
@@ -489,7 +489,7 @@ namespace OpenRCT2::Scripting
return i;
}
}
return {};
return std::nullopt;
}
const TitleSequenceManagerItem* GetItem() const

View File

@@ -1556,12 +1556,12 @@ static std::optional<StationIndex> GetStationIndexFromViewSelection(const rct_wi
{
const auto* ride = get_ride(static_cast<ride_id_t>(w.number));
if (ride == nullptr)
return {};
return std::nullopt;
int32_t viewSelectionIndex = w.ride.view - 1 - ride->num_vehicles;
if (viewSelectionIndex < 0)
{
return {};
return std::nullopt;
}
for (StationIndex index = 0; index < sizeof(ride->stations); ++index)
@@ -1575,7 +1575,7 @@ static std::optional<StationIndex> GetStationIndexFromViewSelection(const rct_wi
}
}
}
return {};
return std::nullopt;
}
/**