Skip to content

Commit

Permalink
[#490] Rename Slice::size to Size::number_of_bytes
Browse files Browse the repository at this point in the history
  • Loading branch information
orecham committed Nov 7, 2024
1 parent 103a02c commit 5962a0c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions iceoryx2-ffi/cxx/include/iox/slice.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -90,7 +90,7 @@ Slice<T>::Slice(T* data, uint64_t number_of_elements)
}

template <typename T>
auto Slice<T>::size() const -> uint64_t {
auto Slice<T>::number_of_bytes() const -> uint64_t {
return (sizeof(ValueType) * m_number_of_elements + alignof(ValueType) - 1) & ~(alignof(ValueType) - 1);
}

Expand Down

0 comments on commit 5962a0c

Please sign in to comment.