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:
@@ -234,7 +234,7 @@ std::optional<ShortcutInput> ShortcutManager::ConvertLegacyBinding(uint16_t bind
|
||||
|
||||
if (binding == nullBinding)
|
||||
{
|
||||
return {};
|
||||
return std::nullopt;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user