From 0373091baa14fd4c19dc66514ba560d442364a67 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 dfb6fca2..65177795 100644 --- a/rmw_zenoh_cpp/src/detail/zenoh_utils.cpp +++ b/rmw_zenoh_cpp/src/detail/zenoh_utils.cpp @@ -121,7 +121,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; @@ -132,7 +132,7 @@ const uint8_t * Payload::data() } } -size_t Payload::size() +size_t Payload::size() const { if (std::holds_alternative(bytes_)) { return 0; @@ -143,7 +143,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 f4305491..c4b8d69f 100644 --- a/rmw_zenoh_cpp/src/detail/zenoh_utils.hpp +++ b/rmw_zenoh_cpp/src/detail/zenoh_utils.hpp @@ -108,7 +108,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_