HaywireInteractive / OnAllFronts-Public

UE5 MilSim FPS / RTS Game (formerly ProjectM)
MIT License
126 stars 24 forks source link

Refactor UMassProjectileHitSubsystem::RemoveHits to not return TArray #844

Closed Leroy231 closed 1 week ago

Leroy231 commented 9 months ago

By returning a TArray we may end up copying the array needlessly. To improve performance, we should change the signature of RemoveHits to take in a TArray reference and populate it inside the function: void RemoveHits(const FMassEntityHandle& Entity, TArray<FMassProjectileHitResult>& OutHits);