Revision: 76310
http://sourceforge.net/p/brlcad/code/76310
Author: starseeker
Date: 2020-07-10 12:58:59 +0000 (Fri, 10 Jul 2020)
Log Message:
-----------
Reject a gdiff result if either side trips the search filters, not just when
both do.
Modified Paths:
--------------
brlcad/trunk/src/gtools/gdiff/gdiff.c
Modified: brlcad/trunk/src/gtools/gdiff/gdiff.c
===================================================================
--- brlcad/trunk/src/gtools/gdiff/gdiff.c 2020-07-10 12:37:56 UTC (rev
76309)
+++ brlcad/trunk/src/gtools/gdiff/gdiff.c 2020-07-10 12:58:59 UTC (rev
76310)
@@ -55,8 +55,10 @@
BU_PTBL_INIT(&results_filtered);
for (i = 0; i < (int)BU_PTBL_LEN(&results); i++) {
struct diff_result *dr = (struct diff_result
*)BU_PTBL_GET(&results, i);
- if ((dr->dp_left != RT_DIR_NULL &&
(bu_ptbl_locate(&left_dbip_filtered, (long *)dr->dp_left ) != -1)) ||
- (dr->dp_right != RT_DIR_NULL &&
(bu_ptbl_locate(&right_dbip_filtered, (long *)dr->dp_right) != -1))) {
+ // If both sides pass the filters, it's in - otherwise it's out
+ int lpass = (dr->dp_left != RT_DIR_NULL &&
(bu_ptbl_locate(&left_dbip_filtered, (long *)dr->dp_left ) != -1));
+ int rpass = (dr->dp_right != RT_DIR_NULL &&
(bu_ptbl_locate(&right_dbip_filtered, (long *)dr->dp_right) != -1));
+ if (lpass && rpass) {
bu_ptbl_ins(&results_filtered, (long *)dr);
filtered_diff_state |= dr->param_state;
filtered_diff_state |= dr->attr_state;
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