mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-02-02 11:45:13 +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:
@@ -26,18 +26,18 @@ void ScenarioSetSettingAction::Serialise(DataSerialiser& stream)
|
||||
stream << DS_TAG(_setting) << DS_TAG(_value);
|
||||
}
|
||||
|
||||
GameActions::Result::Ptr ScenarioSetSettingAction::Query() const
|
||||
GameActions::Result ScenarioSetSettingAction::Query() const
|
||||
{
|
||||
if (_setting >= ScenarioSetSetting::Count)
|
||||
{
|
||||
log_error("Invalid setting: %u", _setting);
|
||||
return MakeResult(GameActions::Status::InvalidParameters, STR_NONE, STR_NONE);
|
||||
return GameActions::Result(GameActions::Status::InvalidParameters, STR_NONE, STR_NONE);
|
||||
}
|
||||
|
||||
return MakeResult();
|
||||
return GameActions::Result();
|
||||
}
|
||||
|
||||
GameActions::Result::Ptr ScenarioSetSettingAction::Execute() const
|
||||
GameActions::Result ScenarioSetSettingAction::Execute() const
|
||||
{
|
||||
switch (_setting)
|
||||
{
|
||||
@@ -242,8 +242,8 @@ GameActions::Result::Ptr ScenarioSetSettingAction::Execute() const
|
||||
break;
|
||||
default:
|
||||
log_error("Invalid setting: %u", _setting);
|
||||
return MakeResult(GameActions::Status::InvalidParameters, STR_NONE, STR_NONE);
|
||||
return GameActions::Result(GameActions::Status::InvalidParameters, STR_NONE, STR_NONE);
|
||||
}
|
||||
window_invalidate_by_class(WC_EDITOR_SCENARIO_OPTIONS);
|
||||
return MakeResult();
|
||||
return GameActions::Result();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user