diff --git a/iceoryx2-ffi/cxx/include/iox2/sample.hpp b/iceoryx2-ffi/cxx/include/iox2/sample.hpp index 30c850c8a..4a1f8e5f7 100644 --- a/iceoryx2-ffi/cxx/include/iox2/sample.hpp +++ b/iceoryx2-ffi/cxx/include/iox2/sample.hpp @@ -55,7 +55,7 @@ class Sample { /// Returns a reference to the payload of the [`Sample`] template ::VALUE, void>> - auto payload() const -> const Payload&; + auto payload() const -> const ValueType&; /// Returns a slice to navigate the payload of the [`Sample`] template ::VALUE, void>> @@ -132,12 +132,12 @@ inline auto Sample::operator->() const -> const Payload* template template -inline auto Sample::payload() const -> const Payload& { +inline auto Sample::payload() const -> const ValueType& { const void* ptr = nullptr; iox2_sample_payload(&m_handle, &ptr, nullptr); - return *static_cast(ptr); + return *static_cast(ptr); } template diff --git a/iceoryx2-ffi/cxx/include/iox2/sample_mut.hpp b/iceoryx2-ffi/cxx/include/iox2/sample_mut.hpp index 9264d5e34..2451d3797 100644 --- a/iceoryx2-ffi/cxx/include/iox2/sample_mut.hpp +++ b/iceoryx2-ffi/cxx/include/iox2/sample_mut.hpp @@ -81,11 +81,11 @@ class SampleMut { /// Returns a reference to the const payload of the sample. template ::VALUE, void>> - auto payload() const -> const Payload&; + auto payload() const -> const ValueType&; /// Returns a reference to the payload of the sample. template ::VALUE, void>> - auto payload_mut() -> Payload&; + auto payload_mut() -> ValueType&; template ::VALUE, void>> auto payload() const -> iox::ImmutableSlice; @@ -199,22 +199,22 @@ inline auto SampleMut::user_header_mut() -> T& { template template -inline auto SampleMut::payload() const -> const Payload& { +inline auto SampleMut::payload() const -> const ValueType& { const void* ptr = nullptr; iox2_sample_mut_payload(&m_handle, &ptr, nullptr); - return *static_cast(ptr); + return *static_cast(ptr); } template template -inline auto SampleMut::payload_mut() -> Payload& { +inline auto SampleMut::payload_mut() -> ValueType& { void* ptr = nullptr; iox2_sample_mut_payload_mut(&m_handle, &ptr, nullptr); - return *static_cast(ptr); + return *static_cast(ptr); } template diff --git a/iceoryx2-ffi/cxx/include/iox2/sample_mut_uninit.hpp b/iceoryx2-ffi/cxx/include/iox2/sample_mut_uninit.hpp index faaa2e9c2..b90dc6489 100644 --- a/iceoryx2-ffi/cxx/include/iox2/sample_mut_uninit.hpp +++ b/iceoryx2-ffi/cxx/include/iox2/sample_mut_uninit.hpp @@ -59,11 +59,11 @@ class SampleMutUninit { /// Returns a reference to the const payload of the sample. template ::VALUE, void>> - auto payload() const -> const Payload&; + auto payload() const -> const ValueType&; /// Returns a reference to the payload of the sample. template ::VALUE, void>> - auto payload_mut() -> Payload&; + auto payload_mut() -> ValueType&; template ::VALUE, void>> auto payload() const -> iox::ImmutableSlice; @@ -143,13 +143,13 @@ inline auto SampleMutUninit::user_header_mut() -> T& { template template -inline auto SampleMutUninit::payload() const -> const Payload& { +inline auto SampleMutUninit::payload() const -> const ValueType& { return m_sample.payload(); } template template -inline auto SampleMutUninit::payload_mut() -> Payload& { +inline auto SampleMutUninit::payload_mut() -> ValueType& { return m_sample.payload_mut(); }