From cd4e207d99a99fa4835c7a852395a7e3becf9024 Mon Sep 17 00:00:00 2001 From: conrad Date: Wed, 7 Sep 2022 11:16:53 +1000 Subject: [PATCH] fix --- include/armadillo_bits/Col_meat.hpp | 2 +- include/armadillo_bits/Mat_meat.hpp | 2 +- include/armadillo_bits/Row_meat.hpp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/armadillo_bits/Col_meat.hpp b/include/armadillo_bits/Col_meat.hpp index 3a226e32..6068cfb3 100644 --- a/include/armadillo_bits/Col_meat.hpp +++ b/include/armadillo_bits/Col_meat.hpp @@ -423,7 +423,7 @@ Col::operator=(Col&& X) if(this == &X) { return *this; } - if( (Mat::mem_state <= 1) && (X.n_alloc > arma_config::mat_prealloc) || (X.mem_state == 1) || (X.mem_state == 2)) + if( (Mat::mem_state <= 1) && ((X.n_alloc > arma_config::mat_prealloc) || (X.mem_state == 1) || (X.mem_state == 2)) ) { (*this).reset(); diff --git a/include/armadillo_bits/Mat_meat.hpp b/include/armadillo_bits/Mat_meat.hpp index c5fd8cad..7174da60 100644 --- a/include/armadillo_bits/Mat_meat.hpp +++ b/include/armadillo_bits/Mat_meat.hpp @@ -794,7 +794,7 @@ Mat::operator=(Mat&& X) if(this == &X) { return *this; } - if( (mem_state <= 1) && (X.n_alloc > arma_config::mat_prealloc) || (X.mem_state == 1) || (X.mem_state == 2)) + if( (mem_state <= 1) && ((X.n_alloc > arma_config::mat_prealloc) || (X.mem_state == 1) || (X.mem_state == 2)) ) { (*this).reset(); diff --git a/include/armadillo_bits/Row_meat.hpp b/include/armadillo_bits/Row_meat.hpp index d838a9fe..1b135c33 100644 --- a/include/armadillo_bits/Row_meat.hpp +++ b/include/armadillo_bits/Row_meat.hpp @@ -423,7 +423,7 @@ Row::operator=(Row&& X) if(this == &X) { return *this; } - if( (Mat::mem_state <= 1) && (X.n_alloc > arma_config::mat_prealloc) || (X.mem_state == 1) || (X.mem_state == 2)) + if( (Mat::mem_state <= 1) && ((X.n_alloc > arma_config::mat_prealloc) || (X.mem_state == 1) || (X.mem_state == 2)) ) { (*this).reset();