Skip to content

Commit

Permalink
Fix build errors
Browse files Browse the repository at this point in the history
  • Loading branch information
fuzzypixelz committed Dec 20, 2024
1 parent 759c717 commit 0373091
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions rmw_zenoh_cpp/src/detail/zenoh_utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<Empty>(bytes_)) {
return nullptr;
Expand All @@ -132,7 +132,7 @@ const uint8_t * Payload::data()
}
}

size_t Payload::size()
size_t Payload::size() const
{
if (std::holds_alternative<Empty>(bytes_)) {
return 0;
Expand All @@ -143,7 +143,7 @@ size_t Payload::size()
}
}

bool Payload::empty()
bool Payload::empty() const
{
return std::holds_alternative<Empty>(bytes_);
}
Expand Down
2 changes: 1 addition & 1 deletion rmw_zenoh_cpp/src/detail/zenoh_utils.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ class Payload
// Is `std::vector<uint8_t>` in case of a non-contiguous payload
// and `zenoh::Slice` plus a `zenoh::Bytes` otherwise.
std::variant<NonContiguous, Contiguous, Empty> bytes_;
}
};
} // namespace rmw_zenoh_cpp

#endif // DETAIL__ZENOH_UTILS_HPP_

0 comments on commit 0373091

Please sign in to comment.