BAN: Mark ByteSpan::slice as [[nodiscard]]

This commit is contained in:
Bananymous 2024-11-26 00:54:35 +02:00
parent 793c0368f2
commit 0af80d48ee
1 changed files with 1 additions and 1 deletions

View File

@ -84,7 +84,7 @@ namespace BAN
return Span<S>(reinterpret_cast<S*>(m_data), m_size / sizeof(S)); return Span<S>(reinterpret_cast<S*>(m_data), m_size / sizeof(S));
} }
ByteSpanGeneral slice(size_type offset, size_type length = size_type(-1)) const [[nodiscard]] ByteSpanGeneral slice(size_type offset, size_type length = size_type(-1)) const
{ {
ASSERT(m_data); ASSERT(m_data);
ASSERT(m_size >= offset); ASSERT(m_size >= offset);