Skip to content

Commit

Permalink
mitigate C5045
Browse files Browse the repository at this point in the history
  • Loading branch information
correaa committed Feb 16, 2025
1 parent 53c041f commit 5ca9fe5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions include/boost/multi/detail/layout.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -206,8 +206,8 @@ struct extensions_t : boost::multi::detail::tuple_prepend_t<index_extension, typ
template<class... Indices>
constexpr auto prev_canonical(index& idx, Indices&... rest) const -> bool { // NOLINT(google-runtime-references) idx is mutated
if(extensions_t<D-1>{this->base().tail()}.prev_canonical(rest...)) { --idx; }
if(idx < this->base().head().first()) {
idx = this->base().head().back();
if(idx < static_cast<index>(this->base().head().first())) {
idx = static_cast<index>(this->base().head().back());
return true;
}
return false;
Expand Down

0 comments on commit 5ca9fe5

Please sign in to comment.