diff --git a/LibCarla/source/carla/sensor/data/ObstacleDetectionEvent.h b/LibCarla/source/carla/sensor/data/ObstacleDetectionEvent.h index 7f1fa9454..decb1b19c 100644 --- a/LibCarla/source/carla/sensor/data/ObstacleDetectionEvent.h +++ b/LibCarla/source/carla/sensor/data/ObstacleDetectionEvent.h @@ -31,8 +31,8 @@ namespace data { _self_actor(nullptr), _other_actor(nullptr) { auto ddata = Serializer::DeserializeRawData(data); - _self_actor = ddata.self_actor; - _other_actor = ddata.other_actor; + _self_actor = std::move(ddata.self_actor); + _other_actor = std::move(ddata.other_actor); _distance = ddata.distance; }