From 38170db32afb0d1226e09576930b14f8613c06ea Mon Sep 17 00:00:00 2001 From: Thomas Krijnen Date: Tue, 22 Mar 2022 22:30:27 +0100 Subject: [PATCH] #2080 Don't allow parameterless Kernel constructor --- src/ifcgeom/IfcGeom.h | 4 ++-- src/ifcgeom_schema_agnostic/Kernel.h | 5 ++++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/ifcgeom/IfcGeom.h b/src/ifcgeom/IfcGeom.h index cdf3a6414c..687a437c4c 100644 --- a/src/ifcgeom/IfcGeom.h +++ b/src/ifcgeom/IfcGeom.h @@ -299,7 +299,7 @@ private: public: MAKE_TYPE_NAME(Kernel)() - : IfcGeom::Kernel(0) + : IfcGeom::Kernel() , deflection_tolerance(0.001) , max_faces_to_orient(-1.0) , ifc_length_unit(1.0) @@ -321,7 +321,7 @@ public: {} MAKE_TYPE_NAME(Kernel)(const MAKE_TYPE_NAME(Kernel)& other) - : IfcGeom::Kernel(0) + : IfcGeom::Kernel() , deflection_tolerance(other.deflection_tolerance) , max_faces_to_orient(other.max_faces_to_orient) , ifc_length_unit(other.ifc_length_unit) diff --git a/src/ifcgeom_schema_agnostic/Kernel.h b/src/ifcgeom_schema_agnostic/Kernel.h index 3aab1e4632..ceb6174755 100644 --- a/src/ifcgeom_schema_agnostic/Kernel.h +++ b/src/ifcgeom_schema_agnostic/Kernel.h @@ -42,6 +42,9 @@ namespace IfcGeom { private: Kernel* implementation_; + protected: + Kernel() {}; + public: // Tolerances and settings for various geometrical operations: enum GeomValue { @@ -80,7 +83,7 @@ namespace IfcGeom { GV_BOOLEAN_ATTEMPT_2D }; - Kernel(IfcParse::IfcFile* file_ = 0); + Kernel(IfcParse::IfcFile* file_); virtual ~Kernel() {}