Skip to content

Commit

Permalink
Edited comments
Browse files Browse the repository at this point in the history
  • Loading branch information
John Wellbelove committed Feb 18, 2024
1 parent 4b12e98 commit aad8024
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions include/etl/span.h
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@ namespace etl
template <size_t COUNT>
ETL_NODISCARD ETL_CONSTEXPR etl::span<element_type, COUNT> 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<element_type, COUNT>(pbegin, pbegin + COUNT);
Expand All @@ -316,7 +316,7 @@ namespace etl
template <size_t COUNT>
ETL_NODISCARD ETL_CONSTEXPR etl::span<element_type, COUNT> 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<element_type, COUNT>(pbegin + Extent - COUNT, (pbegin + Extent));
Expand All @@ -338,10 +338,10 @@ namespace etl
ETL_NODISCARD ETL_CONSTEXPR
etl::span<element_type, COUNT != etl::dynamic_extent ? COUNT : Extent - OFFSET> 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<element_type, COUNT != etl::dynamic_extent ? COUNT : Extent - OFFSET>(pbegin + OFFSET, (pbegin + Extent))
Expand All @@ -354,10 +354,10 @@ namespace etl
template <size_t OFFSET, size_t COUNT>
etl::span<element_type, COUNT != etl::dynamic_extent ? COUNT : Extent - OFFSET> 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)
Expand Down

0 comments on commit aad8024

Please sign in to comment.