From e0c87d6a67ad9c13e9057ace71175ef4935954ed Mon Sep 17 00:00:00 2001 From: Fahri Ali Rahman Date: Mon, 9 Sep 2024 18:59:33 +0700 Subject: [PATCH] fix for werror --- include/nmtools/array/view/tril.hpp | 2 +- include/nmtools/array/view/triu.hpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/nmtools/array/view/tril.hpp b/include/nmtools/array/view/tril.hpp index b60e42a65..670b68f90 100644 --- a/include/nmtools/array/view/tril.hpp +++ b/include/nmtools/array/view/tril.hpp @@ -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}; diff --git a/include/nmtools/array/view/triu.hpp b/include/nmtools/array/view/triu.hpp index e073a9afe..c54407d49 100644 --- a/include/nmtools/array/view/triu.hpp +++ b/include/nmtools/array/view/triu.hpp @@ -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};