V1028 Possible overflow. Consider casting operands, not the result
This commit is contained in:
@@ -819,7 +819,9 @@ void BSplineParameterCorrection::Init()
|
||||
|
||||
void BSplineParameterCorrection::SetUKnots(const std::vector<double>& afKnots)
|
||||
{
|
||||
if (afKnots.size() != static_cast<std::size_t>(_usUCtrlpoints+_usUOrder))
|
||||
std::size_t numPoints = static_cast<std::size_t>(_usUCtrlpoints);
|
||||
std::size_t order = static_cast<std::size_t>(_usUOrder);
|
||||
if (afKnots.size() != (numPoints + order))
|
||||
return;
|
||||
|
||||
unsigned usUMax = _usUCtrlpoints-_usUOrder+1;
|
||||
@@ -837,7 +839,9 @@ void BSplineParameterCorrection::SetUKnots(const std::vector<double>& afKnots)
|
||||
|
||||
void BSplineParameterCorrection::SetVKnots(const std::vector<double>& afKnots)
|
||||
{
|
||||
if (afKnots.size() != static_cast<std::size_t>(_usVCtrlpoints+_usVOrder))
|
||||
std::size_t numPoints = static_cast<std::size_t>(_usVCtrlpoints);
|
||||
std::size_t order = static_cast<std::size_t>(_usVOrder);
|
||||
if (afKnots.size() != (numPoints + order))
|
||||
return;
|
||||
|
||||
unsigned usVMax = _usVCtrlpoints-_usVOrder+1;
|
||||
|
||||
Reference in New Issue
Block a user