File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -924,10 +924,15 @@ namespace xt
924924 inline bool xstrided_container<D>::is_contiguous() const noexcept
925925 {
926926 using str_type = typename inner_strides_type::value_type;
927- auto is_zero = [](auto i){return i == 0 ;};
927+ auto is_zero = [](auto i)
928+ {
929+ return i == 0 ;
930+ };
928931 // This is unsafe if the strides are all 0. Does that happen?
929932 if (!is_contiguous_container<storage_type>::value)
933+ {
930934 return false ;
935+ }
931936 if (m_layout == layout_type::row_major)
932937 {
933938 auto it = std::find_if_not (m_strides.rbegin (), m_strides.rend (), is_zero);
@@ -939,7 +944,9 @@ namespace xt
939944 auto it = std::find_if_not (m_strides.begin (), m_strides.end (), is_zero);
940945 // If the array has strides of zero, it is a constant, and therefore contiguous.
941946 return it == m_strides.end () || *it == str_type (1 );
942- } else {
947+ }
948+ else
949+ {
943950 return m_strides.empty ();
944951 }
945952 }
You can’t perform that action at this time.
0 commit comments