@@ -208,12 +208,11 @@ bool IfcGeom::Kernel::convert_openings(const IfcSchema::IfcProduct* entity, cons
208208 ? BRepBuilderAPI_GTransform (opening_shape_unlocated,opening_shape_gtrsf,true ).Shape ()
209209 : opening_shape_unlocated.Moved (opening_shape_gtrsf.Trsf ());
210210
211- double opening_volume, original_shape_volume ;
211+ double opening_volume;
212212 if ( Logger::Verbosity () >= Logger::LOG_WARNING ) {
213213 opening_volume = shape_volume (opening_shape);
214214 if ( opening_volume <= ALMOST_ZERO )
215215 Logger::Message (Logger::LOG_WARNING," Empty opening for:" ,entity->entity );
216- original_shape_volume = shape_volume (entity_shape);
217216 }
218217
219218 if (entity_shape.ShapeType () == TopAbs_COMPSOLID) {
@@ -235,9 +234,9 @@ bool IfcGeom::Kernel::convert_openings(const IfcSchema::IfcProduct* entity, cons
235234 BRepCheck_Analyzer analyser (brep_cut_result);
236235 bool is_valid = analyser.IsValid () != 0 ;
237236 if (is_valid) {
238- TopExp_Explorer exp (brep_cut_result, TopAbs_SOLID);
239- for (; exp .More (); exp .Next ()) {
240- builder.Add (compound, exp .Current ());
237+ TopExp_Explorer exp2 (brep_cut_result, TopAbs_SOLID);
238+ for (; exp2 .More (); exp2 .Next ()) {
239+ builder.Add (compound, exp2 .Current ());
241240 added = true ;
242241 }
243242 }
@@ -272,7 +271,7 @@ bool IfcGeom::Kernel::convert_openings(const IfcSchema::IfcProduct* entity, cons
272271 entity_shape = brep_cut_result;
273272 if ( Logger::Verbosity () >= Logger::LOG_WARNING ) {
274273 const double volume_after_subtraction = shape_volume (entity_shape);
275-
274+ double original_shape_volume = shape_volume (entity_shape);
276275 if ( ALMOST_THE_SAME (original_shape_volume,volume_after_subtraction) )
277276 Logger::Message (Logger::LOG_WARNING," Subtraction yields unchanged volume:" ,entity->entity );
278277 }
@@ -615,11 +614,11 @@ IfcSchema::IfcProductDefinitionShape* IfcGeom::tesselate(TopoDS_Shape& shape, do
615614 IfcSchema::IfcFaceOuterBound* bound = new IfcSchema::IfcFaceOuterBound (loop, face.Orientation () != TopAbs_REVERSED);
616615 IfcSchema::IfcFaceBound::list::ptr bounds (new IfcSchema::IfcFaceBound::list);
617616 bounds->push (bound);
618- IfcSchema::IfcFace* face = new IfcSchema::IfcFace (bounds);
617+ IfcSchema::IfcFace* face2 = new IfcSchema::IfcFace (bounds);
619618 es->push (loop);
620619 es->push (bound);
621- es->push (face );
622- faces->push (face );
620+ es->push (face2 );
621+ faces->push (face2 );
623622 }
624623 }
625624 }
@@ -703,15 +702,14 @@ bool IfcGeom::Kernel::fill_nonmanifold_wires_with_planar_faces(TopoDS_Shape& sha
703702 // Now loop over all the vertices that are part of the wire(s) to be filled
704703 for (int i = 1 ; i <= num_verts; ++i) {
705704 first = current = TopoDS::Vertex (vertex_to_edges.FindKey (i));
706- const bool isSame = first.IsSame (current);
707705 // We keep track of the vertices we already used
708706 if (visited.find (vertex_to_edges.FindIndex (current)) != visited.end ()) {
709707 continue ;
710708 }
711709 // Given these vertices, try to find closed loops and create new
712710 // wires out of them.
713711 BRepBuilderAPI_MakeWire w;
714- while ( true ) {
712+ for (;; ) {
715713 visited.insert (vertex_to_edges.FindIndex (current));
716714 // Find the edge that the current vertex is part of and points
717715 // away from the previous vertex (null for the first vertex).
@@ -822,7 +820,7 @@ void IfcGeom::Kernel::remove_redundant_points_from_loop(TColgp_SequenceOfPnt& po
822820 if (tol <= 0 .) tol = getValue (GV_POINT_EQUALITY_TOLERANCE);
823821 tol *= tol;
824822
825- while ( true ) {
823+ for (;; ) {
826824 bool removed = false ;
827825 int n = polygon.Length () - (closed ? 0 : 1 );
828826 for (int i = 1 ; i <= n; ++i) {
0 commit comments