Skip to content

Commit

Permalink
[#264] Fix Mac OS integer conversions
Browse files Browse the repository at this point in the history
  • Loading branch information
elfenpiff committed Jul 28, 2024
1 parent eb03cf6 commit 4764a97
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions iceoryx2-ffi/cxx/include/iox2/publisher.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ class Publisher {
/// Copies the input `value` into a [`SampleMut`] and delivers it.
/// On success it returns the number of [`Subscriber`]s that received
/// the data, otherwise a [`PublisherSendError`] describing the failure.
auto send_copy(const Payload& payload) const -> iox::expected<uint64_t, PublisherSendError>;
auto send_copy(const Payload& payload) const -> iox::expected<size_t, PublisherSendError>;

/// Loans/allocates a [`SampleMut`] from the underlying data segment of the [`Publisher`].
/// The user has to initialize the payload before it can be sent.
Expand Down Expand Up @@ -133,7 +133,7 @@ inline auto Publisher<S, Payload, UserHeader>::id() const -> UniquePublisherId {

template <ServiceType S, typename Payload, typename UserHeader>
inline auto Publisher<S, Payload, UserHeader>::send_copy(const Payload& payload) const
-> iox::expected<uint64_t, PublisherSendError> {
-> iox::expected<size_t, PublisherSendError> {
static_assert(std::is_trivially_copyable<Payload>::value);

auto* ref_handle = iox2_cast_publisher_ref_h(m_handle);
Expand Down
4 changes: 2 additions & 2 deletions iceoryx2-ffi/cxx/include/iox2/sample_mut.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ class SampleMut {

template <ServiceType ST, typename PayloadT, typename UserHeaderT>
friend auto
send_sample(SampleMut<ST, PayloadT, UserHeaderT>&& sample) -> iox::expected<uint64_t, PublisherSendError>;
send_sample(SampleMut<ST, PayloadT, UserHeaderT>&& sample) -> iox::expected<size_t, PublisherSendError>;

explicit SampleMut(iox2_sample_mut_h handle);
void drop();
Expand Down Expand Up @@ -216,7 +216,7 @@ SampleMut<S, Payload, UserHeader>::write_from_fn(const iox::function<typename T:
}

template <ServiceType S, typename Payload, typename UserHeader>
inline auto send_sample(SampleMut<S, Payload, UserHeader>&& sample) -> iox::expected<uint64_t, PublisherSendError> {
inline auto send_sample(SampleMut<S, Payload, UserHeader>&& sample) -> iox::expected<size_t, PublisherSendError> {
size_t number_of_recipients = 0;
auto result = iox2_sample_mut_send(sample.m_handle, &number_of_recipients);
sample.m_handle = nullptr;
Expand Down

0 comments on commit 4764a97

Please sign in to comment.