From 9bdb6a4554422382b27eeaefc94de4b16fcb3f8c Mon Sep 17 00:00:00 2001 From: Michael Tao Date: Tue, 8 Oct 2019 17:41:33 -0400 Subject: [PATCH] made list_to_matrix support empty inputs on matrices with static sizes --- include/igl/list_to_matrix.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/include/igl/list_to_matrix.cpp b/include/igl/list_to_matrix.cpp index 769653d7b..f9aef7025 100644 --- a/include/igl/list_to_matrix.cpp +++ b/include/igl/list_to_matrix.cpp @@ -22,7 +22,11 @@ IGL_INLINE bool igl::list_to_matrix(const std::vector > & V,Eige int m = V.size(); if(m == 0) { - M.resize(0,0); + M.resize( + Derived::RowsAtCompileTime>=0?Derived::RowsAtCompileTime:0 + , + Derived::ColsAtCompileTime>=0?Derived::ColsAtCompileTime:0 + ); return true; } // number of columns