From dbbd18589cb2bd5897f8887e3bd63ebceee3e163 Mon Sep 17 00:00:00 2001 From: Mahmoud Mazouz Date: Thu, 19 Dec 2024 15:51:20 +0100 Subject: [PATCH] Add missing includes --- rmw_zenoh_cpp/src/detail/payload.hpp | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/rmw_zenoh_cpp/src/detail/payload.hpp b/rmw_zenoh_cpp/src/detail/payload.hpp index 34e069ef..e8f661fd 100644 --- a/rmw_zenoh_cpp/src/detail/payload.hpp +++ b/rmw_zenoh_cpp/src/detail/payload.hpp @@ -17,6 +17,8 @@ #include +#include +#include #include #include #include @@ -29,14 +31,6 @@ class Payload public: explicit Payload(const zenoh::Bytes & bytes) { - // NOTE(fuzzypixelz): `zenoh::Bytes` is an list of reference-couted buffers. When the list of - // buffers contains exactly one element, it is not necessary to concatenate the list of buffers. - // In this case, we store a clone of the bytes object to maintain a non-zero reference-count on - // the buffer. This ensures that the slice into said buffer stays valid until we drop our copy - // of the bytes object (at the very least). This case corresponds to the `Contiguous` - // alternative of the `bytes_` variant and aims to optimize away a memcpy during "session-local" - // communication. - zenoh::Bytes::SliceIterator slices = bytes.slice_iter(); std::optional slice = slices.next(); if (!slice.has_value()) {