From 5962a0ce4292e62a40eb4cb7a7dd49b81646265b Mon Sep 17 00:00:00 2001 From: Jeff Ithier Date: Thu, 7 Nov 2024 01:24:01 +0100 Subject: [PATCH] [#490] Rename Slice::size to Size::number_of_bytes --- iceoryx2-ffi/cxx/include/iox/slice.hpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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); }