Revision: 78171
          http://sourceforge.net/p/brlcad/code/78171
Author:   starseeker
Date:     2021-02-04 15:06:26 +0000 (Thu, 04 Feb 2021)
Log Message:
-----------
Make sure tidn and oidn are always correctly initialized.

Modified Paths:
--------------
    brlcad/trunk/src/libged/npush/npush.cpp

Modified: brlcad/trunk/src/libged/npush/npush.cpp
===================================================================
--- brlcad/trunk/src/libged/npush/npush.cpp     2021-02-03 20:35:40 UTC (rev 
78170)
+++ brlcad/trunk/src/libged/npush/npush.cpp     2021-02-04 15:06:26 UTC (rev 
78171)
@@ -98,13 +98,14 @@
            if (dp < o.dp) return true;
            if (o.dp < dp) return false;
 
-           /* If the dp doesn't tell us, check the matrix. */
-           int tidn, oidn;
+           // Important for multiple tests to know if matrices are IDN
+           int tidn = bn_mat_is_equal(mat, bn_mat_identity, tol);;
+           int oidn = bn_mat_is_equal(o.mat, bn_mat_identity, tol);
+
+           /* If the dp didn't resolve the question, check the matrix. */
            if (!bn_mat_is_equal(mat, o.mat, tol)) {
                // We want IDN matrices to be less than any others, regardless
                // of the numerics.
-               tidn = bn_mat_is_equal(mat, bn_mat_identity, tol);
-               oidn = bn_mat_is_equal(o.mat, bn_mat_identity, tol);
                if (tidn && !oidn) return true;
                if (oidn && !tidn) return false;
 

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.



_______________________________________________
BRL-CAD Source Commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-commits

Reply via email to