From aad8024ef1e4553dc293cae403b18553a5370194 Mon Sep 17 00:00:00 2001 From: John Wellbelove Date: Sun, 18 Feb 2024 10:48:01 +0000 Subject: [PATCH] Edited comments --- include/etl/span.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/include/etl/span.h b/include/etl/span.h index 2caa38975..5f19ec3a9 100644 --- a/include/etl/span.h +++ b/include/etl/span.h @@ -296,7 +296,7 @@ namespace etl template ETL_NODISCARD ETL_CONSTEXPR etl::span first() const ETL_NOEXCEPT { - //if Extent is static, check that original span contains at least COUNT elements + // If Extent is static, check that original span contains at least COUNT elements ETL_STATIC_ASSERT((Extent != etl::dynamic_extent) ? COUNT <= Extent : true, "Original span does not contain COUNT elements"); return etl::span(pbegin, pbegin + COUNT); @@ -316,7 +316,7 @@ namespace etl template ETL_NODISCARD ETL_CONSTEXPR etl::span last() const ETL_NOEXCEPT { - //if Extent is static, check that original span contains at least COUNT elements + // If Extent is static, check that original span contains at least COUNT elements ETL_STATIC_ASSERT((Extent != etl::dynamic_extent) ? COUNT <= Extent : true, "Original span does not contain COUNT elements"); return etl::span(pbegin + Extent - COUNT, (pbegin + Extent)); @@ -338,10 +338,10 @@ namespace etl ETL_NODISCARD ETL_CONSTEXPR etl::span subspan() const ETL_NOEXCEPT { - //if Extent is static, check that OFFSET is within the original span + // If Extent is static, check that OFFSET is within the original span ETL_STATIC_ASSERT((Extent != etl::dynamic_extent) ? OFFSET <= Extent : true, "OFFSET is not within the original span"); - //if count is also static, check that OFFSET + COUNT is within the original span + // If count is also static, check that OFFSET + COUNT is within the original span ETL_STATIC_ASSERT((Extent != etl::dynamic_extent) && (COUNT != etl::dynamic_extent) ? COUNT <= (Extent - OFFSET) : true, "OFFSET + COUNT is not within the original span"); return (COUNT == etl::dynamic_extent) ? etl::span(pbegin + OFFSET, (pbegin + Extent)) @@ -354,10 +354,10 @@ namespace etl template etl::span subspan() const { - //if Extent is static, check that OFFSET is within the original span + // If Extent is static, check that OFFSET is within the original span ETL_STATIC_ASSERT((Extent != etl::dynamic_extent) ? OFFSET <= Extent : true, "OFFSET is not within the original span"); - //if count is also static, check that OFFSET + COUNT is within the original span + // If count is also static, check that OFFSET + COUNT is within the original span ETL_STATIC_ASSERT((Extent != etl::dynamic_extent) && (COUNT != etl::dynamic_extent) ? COUNT <= (Extent - OFFSET) : true, "OFFSET + COUNT is not within the original span"); if (COUNT == etl::dynamic_extent)