Skip to content

Commit

Permalink
Another cast
Browse files Browse the repository at this point in the history
  • Loading branch information
crtrott committed Oct 20, 2023
1 parent 9896c58 commit 63965b5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions include/experimental/__p2642_bits/layout_padded.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -406,7 +406,7 @@ class layout_left_padded<PaddingValue>::mapping {
constexpr index_type stride(rank_type r) const noexcept
{
assert(r < extents_type::rank());
if(r == 0) return 1;
if(r == 0) return index_type(1);

index_type value = __padded_stride.value(0);
for (rank_type k = 1; k < r; k++) value *= __extents.extent(k);
Expand Down Expand Up @@ -737,7 +737,7 @@ class layout_right_padded<PaddingValue>::mapping {
constexpr index_type stride(rank_type r) const noexcept
{
assert(r < extents_type::rank());
if(r == extents_type::rank() - 1) return 1;
if(r == extents_type::rank() - 1) return index_type(1);

index_type value = __padded_stride.value(0);
for (rank_type k = extents_type::rank() - 2; k > r; k--) value *= __extents.extent(k);
Expand Down

0 comments on commit 63965b5

Please sign in to comment.