Revision: 65383
http://sourceforge.net/p/brlcad/code/65383
Author: ejno
Date: 2015-06-18 14:41:55 +0000 (Thu, 18 Jun 2015)
Log Message:
-----------
use struct directory flags in get_region_dir()
Modified Paths:
--------------
brlcad/trunk/src/libgcv/conv/fastgen4/fastgen4_write.cpp
Modified: brlcad/trunk/src/libgcv/conv/fastgen4/fastgen4_write.cpp
===================================================================
--- brlcad/trunk/src/libgcv/conv/fastgen4/fastgen4_write.cpp 2015-06-18
14:25:46 UTC (rev 65382)
+++ brlcad/trunk/src/libgcv/conv/fastgen4/fastgen4_write.cpp 2015-06-18
14:41:55 UTC (rev 65383)
@@ -1180,7 +1180,7 @@
throw std::invalid_argument("toplevel");
db_full_path temp = path;
- --temp.fp_len;
+ DB_FULL_PATH_POP(&temp);
return temp;
}
@@ -1192,20 +1192,9 @@
RT_CK_DBI(&db);
RT_CK_FULL_PATH(&path);
- for (std::size_t i = 0; i < path.fp_len; ++i) {
- DBInternal comb_db_internal(db, *DB_FULL_PATH_GET(&path, i));
-
- if ((i == path.fp_len - 1)
- && comb_db_internal.get().idb_minor_type != ID_COMBINATION)
- continue;
-
- const rt_comb_internal &comb_internal = *static_cast<rt_comb_internal *>
-
(comb_db_internal.get().idb_ptr);
- RT_CK_COMB(&comb_internal);
-
- if (comb_internal.region_flag)
+ for (std::size_t i = 0; i < path.fp_len; ++i)
+ if (DB_FULL_PATH_GET(&path, i)->d_flags & RT_DIR_REGION)
return *DB_FULL_PATH_GET(&path, i);
- }
throw std::invalid_argument("no parent region");
}
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