From c84eb298e7fc7b2c0fa9f23e65814c1a607f08c9 Mon Sep 17 00:00:00 2001 From: nsubiron Date: Sun, 30 Sep 2018 11:11:35 +0200 Subject: [PATCH] Check sizeof sensor header --- LibCarla/source/carla/sensor/s11n/SensorHeaderSerializer.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/LibCarla/source/carla/sensor/s11n/SensorHeaderSerializer.cpp b/LibCarla/source/carla/sensor/s11n/SensorHeaderSerializer.cpp index 264d12bfa..dd79a9399 100644 --- a/LibCarla/source/carla/sensor/s11n/SensorHeaderSerializer.cpp +++ b/LibCarla/source/carla/sensor/s11n/SensorHeaderSerializer.cpp @@ -12,6 +12,10 @@ namespace carla { namespace sensor { namespace s11n { + static_assert( + SensorHeaderSerializer::header_offset == 2u * 8u + 6u * 4u, + "Header size missmatch"); + static Buffer PopBufferFromPool() { static auto pool = std::make_shared(); return pool->Pop();