more fixes
This commit is contained in:
parent
59fb4b3ede
commit
77c290f55f
|
@ -43,10 +43,8 @@ namespace detail {
|
|||
/// messages sent through the stream are big and have (approximately) the
|
||||
/// same size.
|
||||
Buffer MakeBuffer() {
|
||||
if (_shared_state)
|
||||
return _shared_state->MakeBuffer();
|
||||
else
|
||||
return Buffer();
|
||||
auto state = _shared_state;
|
||||
return state->MakeBuffer();
|
||||
}
|
||||
|
||||
/// Flush @a buffers down the stream. No copies are made.
|
||||
|
|
|
@ -19,10 +19,8 @@ namespace detail {
|
|||
StreamStateBase::~StreamStateBase() = default;
|
||||
|
||||
Buffer StreamStateBase::MakeBuffer() {
|
||||
if (_buffer_pool)
|
||||
return _buffer_pool->Pop();
|
||||
else
|
||||
return Buffer();
|
||||
auto pool = _buffer_pool;
|
||||
return pool->Pop();
|
||||
}
|
||||
|
||||
} // namespace detail
|
||||
|
|
|
@ -100,14 +100,14 @@ void ASensor::PostActorCreated()
|
|||
void ASensor::EndPlay(EEndPlayReason::Type EndPlayReason)
|
||||
{
|
||||
Super::EndPlay(EndPlayReason);
|
||||
|
||||
|
||||
// close all sessions associated to the sensor stream
|
||||
auto *GameInstance = UCarlaStatics::GetGameInstance(GetEpisode().GetWorld());
|
||||
auto &StreamingServer = GameInstance->GetServer().GetStreamingServer();
|
||||
auto StreamId = carla::streaming::detail::token_type(Stream.GetToken()).get_stream_id();
|
||||
StreamingServer.CloseStream(StreamId);
|
||||
|
||||
Stream = FDataStream();
|
||||
// Stream = FDataStream();
|
||||
|
||||
UCarlaEpisode* Episode = UCarlaStatics::GetCurrentEpisode(GetWorld());
|
||||
if(Episode)
|
||||
|
|
Loading…
Reference in New Issue