Skip to content

Commit ed058ed

Browse files
committed
...
1 parent 425e3be commit ed058ed

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

include/xtensor/views/index_mapper.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -401,7 +401,7 @@ namespace xt
401401
{
402402
constexpr size_t n_indices_full = n_indices_full_v<FirstIndice, OtherIndices...>;
403403

404-
constexpr auto underlying_n_dimensions = as_unsigned(xt::static_dimension<
404+
constexpr auto underlying_n_dimensions = static_cast<std::size_t>(xt::static_dimension<
405405
typename std::decay_t<UnderlyingContainer>::shape_type>::value);
406406

407407
// If there is too many indices, we need to drop the first ones.
@@ -517,7 +517,7 @@ namespace xt
517517
else
518518
{
519519
assert(i < slice.size());
520-
return as_unsigned(slice(as_signed(i)));
520+
return as_unsigned(slice(static_cast<typename current_slice::size_type>(i)));
521521
}
522522
}
523523
else

include/xtensor/views/xslice.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -835,7 +835,7 @@ namespace xt
835835
if constexpr (is_xslice<S>::value)
836836
{
837837
using ST = typename S::size_type;
838-
return as_unsigned(slice(as_signed(i)));
838+
return as_unsigned(slice(static_cast<ST>(i)));
839839
}
840840
else
841841
{

0 commit comments

Comments
 (0)