Reverse Engineering: Fix multiplication result converted to larger type

This commit is contained in:
Chris Hennes
2025-07-21 22:08:50 -05:00
parent 5d84b6044b
commit c6f5e5a262

View File

@@ -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<size_t>(iIter)
* static_cast<size_t>(_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<size_t>(3) * static_cast<size_t>(_usUCtrlpoints)
* static_cast<size_t>(_usUCtrlpoints)
* static_cast<size_t>(_usVCtrlpoints)
* static_cast<size_t>(_usVCtrlpoints));
CalcFirstSmoothMatrix(seq);
CalcSecondSmoothMatrix(seq);
CalcThirdSmoothMatrix(seq);