mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-29 09:44:52 +01:00
* Refactor to result GameActions::Result as copy instead of unique_ptr * Remove alias GameActions::Result::Ptr * Remove MakeResult wrapper * Remove type forwarder in TileInspector
This commit is contained in:
@@ -31,21 +31,21 @@ void ClimateSetAction::Serialise(DataSerialiser& stream)
|
||||
stream << DS_TAG(_climate);
|
||||
}
|
||||
|
||||
GameActions::Result::Ptr ClimateSetAction::Query() const
|
||||
GameActions::Result ClimateSetAction::Query() const
|
||||
{
|
||||
if (_climate >= ClimateType::Count)
|
||||
{
|
||||
return std::make_unique<GameActions::Result>(GameActions::Status::InvalidParameters, STR_INVALID_CLIMATE_ID, STR_NONE);
|
||||
return GameActions::Result(GameActions::Status::InvalidParameters, STR_INVALID_CLIMATE_ID, STR_NONE);
|
||||
}
|
||||
|
||||
return std::make_unique<GameActions::Result>();
|
||||
return GameActions::Result();
|
||||
}
|
||||
|
||||
GameActions::Result::Ptr ClimateSetAction::Execute() const
|
||||
GameActions::Result ClimateSetAction::Execute() const
|
||||
{
|
||||
gClimate = ClimateType{ _climate };
|
||||
|
||||
gfx_invalidate_screen();
|
||||
|
||||
return std::make_unique<GameActions::Result>();
|
||||
return GameActions::Result();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user