Răsfoiți Sursa

- better way to construct NULL-shared_ptr

Alexander Gessler 12 ani în urmă
părinte
comite
078150da57
2 a modificat fișierele cu 2 adăugiri și 3 ștergeri
  1. 1 1
      code/IFCGeometry.cpp
  2. 1 2
      code/IfcBoolean.cpp

+ 1 - 1
code/IFCGeometry.cpp

@@ -764,7 +764,7 @@ bool ProcessGeometricItem(const IfcRepresentationItem& geo, std::vector<unsigned
 			conv.collect_openings->push_back(TempOpening(geo.ToPtr<IfcSolidModel>(),
 				IfcVector3(0,0,0),
 				meshtmp,
-				boost::shared_ptr<TempMesh>((TempMesh*)NULL)));
+				boost::shared_ptr<TempMesh>()));
 		}
 		return true;
 	} 

+ 1 - 2
code/IfcBoolean.cpp

@@ -582,8 +582,7 @@ void ProcessBooleanExtrudedAreaSolidDifference(const IfcExtrudedAreaSolid* as, T
 	boost::shared_ptr<TempMesh> meshtmp = boost::shared_ptr<TempMesh>(new TempMesh());
 	ProcessExtrudedAreaSolid(*as,*meshtmp,conv,false);
 
-	std::vector<TempOpening> openings(1, TempOpening(as,IfcVector3(0,0,0),meshtmp,
-		boost::shared_ptr<TempMesh>((TempMesh*)NULL)));
+	std::vector<TempOpening> openings(1, TempOpening(as,IfcVector3(0,0,0),meshtmp,boost::shared_ptr<TempMesh>()));
 
 	result = first_operand;