change all C style casts for the C++ version

This commit is contained in:
LuisPoveda 2023-01-23 12:44:05 +01:00 committed by bernat
parent 130a2281ba
commit 21178b8696
3 changed files with 8 additions and 8 deletions

View File

@ -1019,8 +1019,8 @@ void FFrameData::ProcessReplayerAnimVehicleWheels(CarlaRecorderAnimWheels Vehicl
for (uint32_t i = 0; i < VehicleAnimWheels.WheelValues.size(); ++i)
{
const WheelInfo& Element = VehicleAnimWheels.WheelValues[i];
VehicleAnim->SetWheelRotYaw((uint8)Element.Location, Element.SteeringAngle);
VehicleAnim->SetWheelPitchAngle((uint8)Element.Location, Element.TireRotation);
VehicleAnim->SetWheelRotYaw(static_cast<uint8>(Element.Location), Element.SteeringAngle);
VehicleAnim->SetWheelPitchAngle(static_cast<uint8>(Element.Location), Element.TireRotation);
}
}

View File

@ -217,22 +217,22 @@ void ACarlaRecorder::AddVehicleWheelsAnimation(FCarlaActor *CarlaActor)
WheelInfo FL;
FL.Location = EVehicleWheelLocation::FL_Wheel;
FL.SteeringAngle = CarlaVehicle->GetWheelSteerAngle(FL.Location);
FL.TireRotation = WheeledVehicleMovementComponent->Wheels[(uint8)FL.Location]->GetRotationAngle();
FL.TireRotation = WheeledVehicleMovementComponent->Wheels[static_cast<uint8>(FL.Location)]->GetRotationAngle();
WheelInfo FR;
FR.Location = EVehicleWheelLocation::FR_Wheel;
FR.SteeringAngle = CarlaVehicle->GetWheelSteerAngle(FR.Location);
FR.TireRotation = WheeledVehicleMovementComponent->Wheels[(uint8)FR.Location]->GetRotationAngle();
FR.TireRotation = WheeledVehicleMovementComponent->Wheels[static_cast<uint8>(FR.Location)]->GetRotationAngle();
WheelInfo BL;
BL.Location = EVehicleWheelLocation::BL_Wheel;
BL.SteeringAngle = CarlaVehicle->GetWheelSteerAngle(BL.Location);
BL.TireRotation = WheeledVehicleMovementComponent->Wheels[(uint8)BL.Location]->GetRotationAngle();
BL.TireRotation = WheeledVehicleMovementComponent->Wheels[static_cast<uint8>(BL.Location)]->GetRotationAngle();
WheelInfo BR;
BR.Location = EVehicleWheelLocation::BR_Wheel;
BR.SteeringAngle = CarlaVehicle->GetWheelSteerAngle(BR.Location);
BR.TireRotation = WheeledVehicleMovementComponent->Wheels[(uint8)BR.Location]->GetRotationAngle();
BR.TireRotation = WheeledVehicleMovementComponent->Wheels[static_cast<uint8>(BR.Location)]->GetRotationAngle();
Record.WheelValues.reserve(4);
Record.WheelValues.push_back(FL);

View File

@ -329,8 +329,8 @@ void CarlaReplayerHelper::ProcessReplayerAnimVehicleWheels(CarlaRecorderAnimWhee
for (uint32_t i = 0; i < VehicleAnimWheels.WheelValues.size(); ++i)
{
const WheelInfo& Element = VehicleAnimWheels.WheelValues[i];
VehicleAnim->SetWheelRotYaw((uint8)Element.Location, Element.SteeringAngle);
VehicleAnim->SetWheelPitchAngle((uint8)Element.Location, Element.TireRotation);
VehicleAnim->SetWheelRotYaw(static_cast<uint8>(Element.Location), Element.SteeringAngle);
VehicleAnim->SetWheelPitchAngle(static_cast<uint8>(Element.Location), Element.TireRotation);
}
}