From f4334551a0ccc9319bc85ab85dc41e60d1cd327e Mon Sep 17 00:00:00 2001 From: bernatx Date: Wed, 23 Nov 2022 16:30:16 +0100 Subject: [PATCH] Removing one std::move from the same variable --- .../Carla/Source/Carla/Game/CarlaEpisode.cpp | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/Unreal/CarlaUE4/Plugins/Carla/Source/Carla/Game/CarlaEpisode.cpp b/Unreal/CarlaUE4/Plugins/Carla/Source/Carla/Game/CarlaEpisode.cpp index 80d07aa0c..67b578391 100644 --- a/Unreal/CarlaUE4/Plugins/Carla/Source/Carla/Game/CarlaEpisode.cpp +++ b/Unreal/CarlaUE4/Plugins/Carla/Source/Carla/Game/CarlaEpisode.cpp @@ -415,23 +415,23 @@ TPair UCarlaEpisode::SpawnActorWithInfo( auto result = ActorDispatcher->SpawnActor(LocalTransform, thisActorDescription, DesiredId); if (result.Key == EActorSpawnResultStatus::Success && bIsPrimaryServer) { - GetFrameData().CreateRecorderEventAdd( - result.Value->GetActorId(), - static_cast(result.Value->GetActorType()), - Transform, - std::move(thisActorDescription)); - } - if (Recorder->IsEnabled()) - { - if (result.Key == EActorSpawnResultStatus::Success) + if (Recorder->IsEnabled()) { Recorder->CreateRecorderEventAdd( result.Value->GetActorId(), static_cast(result.Value->GetActorType()), Transform, - std::move(thisActorDescription) + thisActorDescription ); } + if (bIsPrimaryServer) + { + GetFrameData().CreateRecorderEventAdd( + result.Value->GetActorId(), + static_cast(result.Value->GetActorType()), + Transform, + std::move(thisActorDescription)); + } } return result;