From 9d79933730d7fdb5b582adc5c92484344b9f76a3 Mon Sep 17 00:00:00 2001 From: cslayers <727324237@qq.com> Date: Tue, 25 Jan 2022 10:01:43 +0800 Subject: [PATCH] Definition of unequal for template class matrix4 error. even one element difference can lead to the difference of matrix --- Common/nvMatrix.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Common/nvMatrix.h b/Common/nvMatrix.h index 92879dcf..4953a2b3 100644 --- a/Common/nvMatrix.h +++ b/Common/nvMatrix.h @@ -512,14 +512,14 @@ namespace nv friend bool operator != (const matrix4 &lhs, const matrix4 &rhs) { - bool r = true; for (int i = 0; i < 16; i++) { - r &= lhs._array[i] != rhs._array[i]; + if (lhs._array[i] != rhs._array[i]) + return true; } - return r; + return false; } union