From 724ade0af3a8cacf1373b4b88fc721cb3a76b83a Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer <akohlmey@gmail.com> Date: Thu, 10 May 2018 18:48:47 -0400 Subject: [PATCH] silence compiler warnings about bool vs int in AtC lib --- lib/atc/SparseMatrix-inl.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/atc/SparseMatrix-inl.h b/lib/atc/SparseMatrix-inl.h index 8d6aec78dc..f70dd0361d 100644 --- a/lib/atc/SparseMatrix-inl.h +++ b/lib/atc/SparseMatrix-inl.h @@ -67,9 +67,9 @@ void SparseMatrix<T>::_create(INDEX size, INDEX nrows) // assign memory to hold matrix try { - _val = (_size*nrows) ? new T [_size] : NULL; - _ia = (_size*nrows) ? new INDEX [_nRowsCRS+1] : NULL; - _ja = (_size*nrows) ? new INDEX [_size] : NULL; + _val = (_size && nrows) ? new T [_size] : NULL; + _ia = (_size && nrows) ? new INDEX [_nRowsCRS+1] : NULL; + _ja = (_size && nrows) ? new INDEX [_size] : NULL; } catch (std::exception &e) { -- GitLab