From c6f5e5a262a412b10c0d64e0b0b30da55a911cb0 Mon Sep 17 00:00:00 2001 From: Chris Hennes Date: Mon, 21 Jul 2025 22:08:50 -0500 Subject: [PATCH] Reverse Engineering: Fix multiplication result converted to larger type --- src/Mod/ReverseEngineering/App/ApproxSurface.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/Mod/ReverseEngineering/App/ApproxSurface.cpp b/src/Mod/ReverseEngineering/App/ApproxSurface.cpp index 1063d35e18..c9dbef0cc9 100644 --- a/src/Mod/ReverseEngineering/App/ApproxSurface.cpp +++ b/src/Mod/ReverseEngineering/App/ApproxSurface.cpp @@ -964,7 +964,9 @@ void BSplineParameterCorrection::DoParameterCorrection(int iIter) double fMaxDiff = 0.0, fMaxScalar = 1.0; double fWeight = _fSmoothInfluence; - Base::SequencerLauncher seq("Calc surface...", iIter * _pvcPoints->Length()); + Base::SequencerLauncher seq("Calc surface...", + static_cast(iIter) + * static_cast(_pvcPoints->Length())); do { fMaxScalar = 1.0; @@ -1273,8 +1275,10 @@ void BSplineParameterCorrection::CalcSmoothingTerms(bool bRecalc, { if (bRecalc) { Base::SequencerLauncher seq("Initializing...", - 3 * _usUCtrlpoints * _usUCtrlpoints * _usVCtrlpoints - * _usVCtrlpoints); + static_cast(3) * static_cast(_usUCtrlpoints) + * static_cast(_usUCtrlpoints) + * static_cast(_usVCtrlpoints) + * static_cast(_usVCtrlpoints)); CalcFirstSmoothMatrix(seq); CalcSecondSmoothMatrix(seq); CalcThirdSmoothMatrix(seq);