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

0023268: cppcheck warning: Using size of pointer WIDTHMAP instead of size of its data.

Using the size of the array in bytes.
This commit is contained in:
Pawel 2012-07-12 13:13:58 +02:00
parent 9e4c2fbb29
commit 8bde65b453

View File

@ -382,7 +382,7 @@ void CGM_Driver::InitializeWidthMap (const Handle(Aspect_WidthMap)& aWidthMap)
if (WIDTHMAP)
delete[] WIDTHMAP;
WIDTHMAP = new float[Size];
memset (WIDTHMAP, 0, sizeof(WIDTHMAP));
memset (WIDTHMAP, 0, Size * sizeof(float));
for (Standard_Integer i=1; i<= Size; i++) {
Standard_Real w = aWidthMap->Entry(i).Width();
WIDTHMAP[aWidthMap->Entry(i).Index()] = (float)w;