Revision: 77197
http://sourceforge.net/p/brlcad/code/77197
Author: starseeker
Date: 2020-09-23 03:42:58 +0000 (Wed, 23 Sep 2020)
Log Message:
-----------
If the search filters rule out all possible outputs, we know the answer already.
Modified Paths:
--------------
brlcad/trunk/src/libged/stat/stat.cpp
Modified: brlcad/trunk/src/libged/stat/stat.cpp
===================================================================
--- brlcad/trunk/src/libged/stat/stat.cpp 2020-09-23 03:07:04 UTC (rev
77196)
+++ brlcad/trunk/src/libged/stat/stat.cpp 2020-09-23 03:42:58 UTC (rev
77197)
@@ -549,6 +549,15 @@
int s_flags = 0;
s_flags |= DB_SEARCH_RETURN_UNIQ_DP;
(void)db_search(&sobjs, s_flags, bu_vls_cstr(&search_filter), 0, NULL,
dbip, NULL);
+
+ // If we're not allowed *any* objects according to the filters, there's
no point in
+ // doing any more work - just print the header and exit.
+ if (!BU_PTBL_LEN(&sobjs)) {
+ bu_vls_printf(gedp->ged_result_str, "%s\n", ft_to_string(table));
+ ft_destroy_table(table);
+ bu_ptbl_free(&sobjs);
+ return GED_OK;
+ }
}
struct bu_ptbl objs = BU_PTBL_INIT_ZERO;
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