Refactor explicit constructor usage in RideSetAppearanceAction

This commit is contained in:
ζeh Matt 2021-10-21 20:14:59 +03:00
parent 4a408821fd
commit bb149d471c
No known key found for this signature in database
GPG Key ID: 18CE582C71A225B0
1 changed files with 5 additions and 5 deletions

View File

@ -55,7 +55,7 @@ GameActions::Result::Ptr RideSetAppearanceAction::Query() const
if (ride == nullptr) if (ride == nullptr)
{ {
log_warning("Invalid game command, ride_id = %u", uint32_t(_rideIndex)); log_warning("Invalid game command, ride_id = %u", uint32_t(_rideIndex));
return std::make_unique<GameActions::Result>(GameActions::Status::InvalidParameters, STR_NONE); return std::make_unique<GameActions::Result>(GameActions::Status::InvalidParameters, STR_NONE, STR_NONE);
} }
switch (_type) switch (_type)
@ -66,7 +66,7 @@ GameActions::Result::Ptr RideSetAppearanceAction::Query() const
if (_index >= std::size(ride->track_colour)) if (_index >= std::size(ride->track_colour))
{ {
log_warning("Invalid game command, index %d out of bounds", _index); log_warning("Invalid game command, index %d out of bounds", _index);
return std::make_unique<GameActions::Result>(GameActions::Status::InvalidParameters, STR_NONE); return std::make_unique<GameActions::Result>(GameActions::Status::InvalidParameters, STR_NONE, STR_NONE);
} }
break; break;
case RideSetAppearanceType::VehicleColourBody: case RideSetAppearanceType::VehicleColourBody:
@ -75,7 +75,7 @@ GameActions::Result::Ptr RideSetAppearanceAction::Query() const
if (_index >= std::size(ride->vehicle_colours)) if (_index >= std::size(ride->vehicle_colours))
{ {
log_warning("Invalid game command, index %d out of bounds", _index); log_warning("Invalid game command, index %d out of bounds", _index);
return std::make_unique<GameActions::Result>(GameActions::Status::InvalidParameters, STR_NONE); return std::make_unique<GameActions::Result>(GameActions::Status::InvalidParameters, STR_NONE, STR_NONE);
} }
break; break;
case RideSetAppearanceType::VehicleColourScheme: case RideSetAppearanceType::VehicleColourScheme:
@ -83,7 +83,7 @@ GameActions::Result::Ptr RideSetAppearanceAction::Query() const
break; break;
default: default:
log_warning("Invalid game command, type %d not recognised", _type); log_warning("Invalid game command, type %d not recognised", _type);
return std::make_unique<GameActions::Result>(GameActions::Status::InvalidParameters, STR_NONE); return std::make_unique<GameActions::Result>(GameActions::Status::InvalidParameters, STR_NONE, STR_NONE);
} }
return std::make_unique<GameActions::Result>(); return std::make_unique<GameActions::Result>();
@ -95,7 +95,7 @@ GameActions::Result::Ptr RideSetAppearanceAction::Execute() const
if (ride == nullptr) if (ride == nullptr)
{ {
log_warning("Invalid game command, ride_id = %u", uint32_t(_rideIndex)); log_warning("Invalid game command, ride_id = %u", uint32_t(_rideIndex));
return std::make_unique<GameActions::Result>(GameActions::Status::InvalidParameters, STR_NONE); return std::make_unique<GameActions::Result>(GameActions::Status::InvalidParameters, STR_NONE, STR_NONE);
} }
switch (_type) switch (_type)