From 9d6c3de22fafc2c8d96c25e774ff01feb6d28c5e Mon Sep 17 00:00:00 2001 From: Fahri Ali Rahman Date: Sat, 25 May 2024 21:47:10 +0700 Subject: [PATCH] fix gcc werror --- include/nmtools/array/view/vstack.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/nmtools/array/view/vstack.hpp b/include/nmtools/array/view/vstack.hpp index 477f6d722..16480619f 100644 --- a/include/nmtools/array/view/vstack.hpp +++ b/include/nmtools/array/view/vstack.hpp @@ -18,8 +18,8 @@ namespace nmtools::index if constexpr (!meta::is_constant_index_array_v) { auto src_dim = len(src_shape); - auto dst_dim = (src_dim == 1 ? 2 : src_dim); if constexpr (meta::is_resizable_v) { + auto dst_dim = (src_dim == 1 ? 2 : src_dim); result.resize(dst_dim); } if (src_dim == 1) {