Moving template code to CPP
This commit is contained in:
parent
b96428adec
commit
1b205b388d
|
@ -0,0 +1,26 @@
|
|||
// Copyright (c) 2017 Computer Vision Center (CVC) at the Universitat Autonoma
|
||||
// de Barcelona (UAB).
|
||||
//
|
||||
// This work is licensed under the terms of the MIT license.
|
||||
// For a copy, see <https://opensource.org/licenses/MIT>.
|
||||
|
||||
#include "Carla/Game/CarlaEngine.h"
|
||||
#include "Carla/Sensor/AsyncDataStream.h"
|
||||
|
||||
template <typename T>
|
||||
template <typename SensorT>
|
||||
inline FAsyncDataStreamTmpl<T>::FAsyncDataStreamTmpl(
|
||||
const SensorT &Sensor,
|
||||
double Timestamp,
|
||||
StreamType InStream)
|
||||
: Stream(std::move(InStream)),
|
||||
Header([&Sensor, Timestamp]() {
|
||||
//check(IsInGameThread());
|
||||
using Serializer = carla::sensor::s11n::SensorHeaderSerializer;
|
||||
return Serializer::Serialize(
|
||||
carla::sensor::SensorRegistry::template get<SensorT*>::index,
|
||||
FCarlaEngine::GetFrameCounter(),
|
||||
Timestamp,
|
||||
/// TODO: raname to 'GetActorTransform' once the new tick pipeline is done
|
||||
Sensor.GetSyncActorTransform());
|
||||
}()) {}
|
|
@ -15,7 +15,6 @@
|
|||
|
||||
template <typename T>
|
||||
class FDataStreamTmpl;
|
||||
class FCarlaEngine;
|
||||
|
||||
// =============================================================================
|
||||
// -- FAsyncDataStreamTmpl -----------------------------------------------------
|
||||
|
@ -94,21 +93,3 @@ inline void FAsyncDataStreamTmpl<T>::Send(SensorT &Sensor, ArgsT &&... Args)
|
|||
std::move(Header),
|
||||
carla::sensor::SensorRegistry::Serialize(Sensor, std::forward<ArgsT>(Args)...));
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
template <typename SensorT>
|
||||
inline FAsyncDataStreamTmpl<T>::FAsyncDataStreamTmpl(
|
||||
const SensorT &Sensor,
|
||||
double Timestamp,
|
||||
StreamType InStream)
|
||||
: Stream(std::move(InStream)),
|
||||
Header([&Sensor, Timestamp]() {
|
||||
//check(IsInGameThread());
|
||||
using Serializer = carla::sensor::s11n::SensorHeaderSerializer;
|
||||
return Serializer::Serialize(
|
||||
carla::sensor::SensorRegistry::template get<SensorT*>::index,
|
||||
FCarlaEngine::GetFrameCounter(),
|
||||
Timestamp,
|
||||
/// TODO: raname to 'GetActorTransform' once the new tick pipeline is done
|
||||
Sensor.GetSyncActorTransform());
|
||||
}()) {}
|
||||
|
|
Loading…
Reference in New Issue