diff --git a/iceoryx2-ffi/cxx/include/iox/slice.hpp b/iceoryx2-ffi/cxx/include/iox/slice.hpp index 48220726e..116f3b14a 100644 --- a/iceoryx2-ffi/cxx/include/iox/slice.hpp +++ b/iceoryx2-ffi/cxx/include/iox/slice.hpp @@ -28,9 +28,9 @@ class Slice { Slice(T* data, uint64_t number_of_elements); - /// @brief Returns the size of the slice in bytes. - /// @return The size of the slice in bytes. - auto size() const -> uint64_t; + /// @brief Returns the number of bytes the slice operates over. + /// @return The number of bytes the slice operates over. + auto number_of_bytes() const -> uint64_t; /// @brief Returns the number of elements in the slice. /// @return The number of elements in the slice. @@ -90,7 +90,7 @@ Slice::Slice(T* data, uint64_t number_of_elements) } template -auto Slice::size() const -> uint64_t { +auto Slice::number_of_bytes() const -> uint64_t { return (sizeof(ValueType) * m_number_of_elements + alignof(ValueType) - 1) & ~(alignof(ValueType) - 1); }