Skip to content

Commit

Permalink
fix for werror
Browse files Browse the repository at this point in the history
  • Loading branch information
alifahrri committed Sep 9, 2024
1 parent 8a1c8ed commit e0c87d6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion include/nmtools/array/view/tril.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ namespace nmtools::index
nm_index_t index_0 = at(indices,meta::ct_v<-2>);
nm_index_t index_1 = at(indices,meta::ct_v<-1>);

if (index_1 > (index_0 + k)) {
if ((nm_index_t)index_1 > nm_index_t(index_0 + k)) {
return return_t{meta::Nothing};
} else {
return return_t{result};
Expand Down
2 changes: 1 addition & 1 deletion include/nmtools/array/view/triu.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ namespace nmtools::index
nm_index_t index_0 = at(indices,meta::ct_v<-2>);
nm_index_t index_1 = at(indices,meta::ct_v<-1>);

if (index_0 > (index_1 - k)) {
if ((nm_index_t)index_0 > nm_index_t(index_1 - k)) {
return return_t{meta::Nothing};
} else {
return return_t{result};
Expand Down

0 comments on commit e0c87d6

Please sign in to comment.