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_