Skip to content

Commit

Permalink
Update JSBSimMovementCompVisualizer.cpp
Browse files Browse the repository at this point in the history
Remove unnecessary if statements
  • Loading branch information
fadak0828 authored Dec 30, 2024
1 parent c516f96 commit cafde9a
Showing 1 changed file with 0 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -51,22 +51,13 @@ FJSBSimMovementCompVisualizer::~FJSBSimMovementCompVisualizer()

void FJSBSimMovementCompVisualizer::DrawVisualization(const UActorComponent* Component, const FSceneView* View, FPrimitiveDrawInterface* PDI)
{
if (!Component || !PDI)
{
return;
}

const UJSBSimMovementComponent* MovementComponent = Cast<UJSBSimMovementComponent>(Component);
if (!MovementComponent)
{
return;
}

AActor* Owner = Component->GetOwner();
if (!Owner)
{
return;
}

// Make sure we are ready to visualize this component
if (!MovementComponent->IsReadyForCompVisualizer)
Expand Down Expand Up @@ -114,22 +105,13 @@ void FJSBSimMovementCompVisualizer::DrawVisualization(const UActorComponent* Com

void FJSBSimMovementCompVisualizer::DrawVisualizationHUD(const UActorComponent* Component, const FViewport* Viewport, const FSceneView* View, FCanvas* Canvas)
{
if (!Component || !View || !Canvas)
{
return;
}

const UJSBSimMovementComponent* MovementComponent = Cast<UJSBSimMovementComponent>(Component);
if (!MovementComponent)
{
return;
}

AActor* Owner = MovementComponent->GetOwner();
if (!Owner)
{
return;
}

FVector2D PixelLocation;

Expand Down

0 comments on commit cafde9a

Please sign in to comment.