From 0af80d48ee5e421232be8f9d5557b44ff5ffca30 Mon Sep 17 00:00:00 2001 From: Bananymous Date: Tue, 26 Nov 2024 00:54:35 +0200 Subject: [PATCH] BAN: Mark ByteSpan::slice as [[nodiscard]] --- BAN/include/BAN/ByteSpan.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/BAN/include/BAN/ByteSpan.h b/BAN/include/BAN/ByteSpan.h index 40eacdfa39..faea6fa43d 100644 --- a/BAN/include/BAN/ByteSpan.h +++ b/BAN/include/BAN/ByteSpan.h @@ -84,7 +84,7 @@ namespace BAN return Span(reinterpret_cast(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_size >= offset);