diff options
Diffstat (limited to 'src/CGAL_Nef_polyhedron.h')
-rw-r--r-- | src/CGAL_Nef_polyhedron.h | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/CGAL_Nef_polyhedron.h b/src/CGAL_Nef_polyhedron.h index 616ba23..a2eedaf 100644 --- a/src/CGAL_Nef_polyhedron.h +++ b/src/CGAL_Nef_polyhedron.h @@ -4,13 +4,14 @@ #ifdef ENABLE_CGAL #include "cgalfwd.h" +#include "memory.h" class CGAL_Nef_polyhedron { public: - CGAL_Nef_polyhedron() : dim(0), p2(0), p3(0) {} - CGAL_Nef_polyhedron(CGAL_Nef_polyhedron2 *p) : dim(2), p2(p), p3(0) {} - CGAL_Nef_polyhedron(CGAL_Nef_polyhedron3 *p) : dim(3), p2(0), p3(p) {} + CGAL_Nef_polyhedron() : dim(0) {} + CGAL_Nef_polyhedron(CGAL_Nef_polyhedron2 *p) : dim(2), p2(p) {} + CGAL_Nef_polyhedron(CGAL_Nef_polyhedron3 *p) : dim(3), p3(p) {} ~CGAL_Nef_polyhedron() {} bool empty() const { return (dim == 0 || !p2 && !p3); } @@ -24,9 +25,8 @@ public: class DxfData *convertToDxfData() const; int dim; - // FIXME: Define ownership of the CGAL objects, e.g. use reference-counted smart pointers - CGAL_Nef_polyhedron2 *p2; - CGAL_Nef_polyhedron3 *p3; + shared_ptr<CGAL_Nef_polyhedron2> p2; + shared_ptr<CGAL_Nef_polyhedron3> p3; }; #endif /* ENABLE_CGAL */ |