From c639199c01f281a9fc132fc6df87cb33df49f71f Mon Sep 17 00:00:00 2001 From: Dmitrii Kulikov <164657232+AtheneNoctuaPt@users.noreply.github.com> Date: Wed, 14 Jan 2026 14:49:43 +0000 Subject: [PATCH] Fixed warnings that appear when building with MSVC (#1004) - Refactored loop control flow to use an `if` statement instead of a `for` loop with immediate `break` - Changed variable type from `int` to `size_t` to match the expected type and eliminate conversion warnings --- src/FoundationClasses/TKMath/MathInteg/MathInteg_Gauss.hxx | 2 +- .../TKBO/GTests/BOPAlgo_PaveFiller_Test.cxx | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/FoundationClasses/TKMath/MathInteg/MathInteg_Gauss.hxx b/src/FoundationClasses/TKMath/MathInteg/MathInteg_Gauss.hxx index 5cba9bde8d..d96f649df9 100644 --- a/src/FoundationClasses/TKMath/MathInteg/MathInteg_Gauss.hxx +++ b/src/FoundationClasses/TKMath/MathInteg/MathInteg_Gauss.hxx @@ -202,7 +202,7 @@ IntegResult GaussComposite(Function& theFunc, const double aH = (theUpper - theLower) / theNbIntervals; double aSum = 0.0; - int aTotalPoints = 0; + size_t aTotalPoints = 0; for (int i = 0; i < theNbIntervals; ++i) { diff --git a/src/ModelingAlgorithms/TKBO/GTests/BOPAlgo_PaveFiller_Test.cxx b/src/ModelingAlgorithms/TKBO/GTests/BOPAlgo_PaveFiller_Test.cxx index 9540ae25d1..6f3436ff66 100644 --- a/src/ModelingAlgorithms/TKBO/GTests/BOPAlgo_PaveFiller_Test.cxx +++ b/src/ModelingAlgorithms/TKBO/GTests/BOPAlgo_PaveFiller_Test.cxx @@ -277,7 +277,8 @@ TEST_F(BOPAlgo_PaveFillerTest, FuseConeWithRemovedPCurve_NullPCurveHandling) TopoDS_Wire aNewWire; aBuilder.MakeWire(aNewWire); - for (TopExp_Explorer aWireExp(aConicalFace, TopAbs_WIRE); aWireExp.More(); aWireExp.Next()) + TopExp_Explorer aWireExp(aConicalFace, TopAbs_WIRE); + if (aWireExp.More()) // Only process first wire { const TopoDS_Wire& aWire = TopoDS::Wire(aWireExp.Current()); for (TopExp_Explorer anEdgeExp(aWire, TopAbs_EDGE); anEdgeExp.More(); anEdgeExp.Next()) @@ -292,7 +293,6 @@ TEST_F(BOPAlgo_PaveFillerTest, FuseConeWithRemovedPCurve_NullPCurveHandling) aBuilder.Add(aNewWire, anEdge); } } - break; // Only process first wire } // Create new face with the modified wire