From e289a48d9f0546108f5ac8d4972dc162c6a40c49 Mon Sep 17 00:00:00 2001 From: Mahmoud Mazouz Date: Fri, 20 Dec 2024 12:58:54 +0000 Subject: [PATCH] Fix build errors --- rmw_zenoh_cpp/src/detail/zenoh_utils.cpp | 6 +++--- rmw_zenoh_cpp/src/detail/zenoh_utils.hpp | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/rmw_zenoh_cpp/src/detail/zenoh_utils.cpp b/rmw_zenoh_cpp/src/detail/zenoh_utils.cpp index 8145ef7c..5770718b 100644 --- a/rmw_zenoh_cpp/src/detail/zenoh_utils.cpp +++ b/rmw_zenoh_cpp/src/detail/zenoh_utils.cpp @@ -101,7 +101,7 @@ Payload::Payload(const zenoh::Bytes & bytes) } } -const uint8_t * Payload::data() +const uint8_t * Payload::data() const { if (std::holds_alternative(bytes_)) { return nullptr; @@ -112,7 +112,7 @@ const uint8_t * Payload::data() } } -size_t Payload::size() +size_t Payload::size() const { if (std::holds_alternative(bytes_)) { return 0; @@ -123,7 +123,7 @@ size_t Payload::size() } } -bool Payload::empty() +bool Payload::empty() const { return std::holds_alternative(bytes_); } diff --git a/rmw_zenoh_cpp/src/detail/zenoh_utils.hpp b/rmw_zenoh_cpp/src/detail/zenoh_utils.hpp index 31a6d77c..dd7cff72 100644 --- a/rmw_zenoh_cpp/src/detail/zenoh_utils.hpp +++ b/rmw_zenoh_cpp/src/detail/zenoh_utils.hpp @@ -91,7 +91,7 @@ class Payload // Is `std::vector` in case of a non-contiguous payload // and `zenoh::Slice` plus a `zenoh::Bytes` otherwise. std::variant bytes_; -} +}; } // namespace rmw_zenoh_cpp #endif // DETAIL__ZENOH_UTILS_HPP_