1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-04-03 17:56:21 +03:00

0032677: Coding Rules, Geom_BezierSurface - eliminate GCC warning -Wmaybe-uninitialized -fsanitize=undefined

Fixed initialization of TColStd_Array1OfReal for weights.
This commit is contained in:
kgv 2021-11-22 01:54:20 +03:00 committed by smoskvin
parent 7ac3f543c7
commit d62df471b2

View File

@ -739,14 +739,12 @@ void Geom_BezierSurface::InsertPoleRowAfter (const Standard_Integer UIndex,
Handle(TColStd_HArray2OfReal) nweights;
if (urational || vrational) {
nweights =
new TColStd_HArray2OfReal(1,poles->ColLength()+1,1,poles->RowLength());
if (urational || vrational)
{
nweights = new TColStd_HArray2OfReal(1,poles->ColLength()+1,1,poles->RowLength());
// TColStd_Array1OfReal CWeights(nweights->LowerCol(),nweights->UpperCol(),
// 1.0); ???????????
TColStd_Array1OfReal CWeights(1.0,
nweights->LowerCol(),nweights->UpperCol());
TColStd_Array1OfReal CWeights (nweights->LowerCol(), nweights->UpperCol());
CWeights.Init (1.0);
AddRatPoleRow (poles->Array2(), weights->Array2(),
CPoles, CWeights, UIndex,