Revision: 73963
http://sourceforge.net/p/brlcad/code/73963
Author: starseeker
Date: 2019-09-19 00:44:43 +0000 (Thu, 19 Sep 2019)
Log Message:
-----------
Might as well use a vector here and avoid the overhead of set
Modified Paths:
--------------
brlcad/trunk/src/libbrep/cdt_mesh.cpp
Modified: brlcad/trunk/src/libbrep/cdt_mesh.cpp
===================================================================
--- brlcad/trunk/src/libbrep/cdt_mesh.cpp 2019-09-18 22:25:56 UTC (rev
73962)
+++ brlcad/trunk/src/libbrep/cdt_mesh.cpp 2019-09-19 00:44:43 UTC (rev
73963)
@@ -1474,13 +1474,11 @@
return (long)(normals.size() - 1);
}
-#if 1
static bool NearTrisCallback(size_t data, void *a_context) {
- std::set<size_t> *near_tris = (std::set<size_t> *)a_context;
- near_tris->insert(data);
+ std::vector<size_t> *near_tris = (std::vector<size_t> *)a_context;
+ near_tris->push_back(data);
return true;
}
-#endif
// TODO - perf reports a huge percentage of time is spend dealing with
// tri_add - we should only need the uniqueness guarantee for triangles
@@ -1513,12 +1511,12 @@
fMax[1] = bb.Max().y;
fMax[2] = bb.Max().z;
- std::set<size_t> near_tris;
+ std::vector<size_t> near_tris;
size_t nhits = tris_tree.Search(fMin, fMax, NearTrisCallback, &near_tris);
if (nhits) {
// We've got something nearby, see if any of them are duplicates
- std::set<size_t>::iterator t_it;
+ std::vector<size_t>::iterator t_it;
for (t_it = near_tris.begin(); t_it != near_tris.end(); t_it++) {
triangle_t orig = tris_vect[*t_it];
if (tri == orig) {
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