mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-04-10 18:51: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:
parent
9e4c2fbb29
commit
8bde65b453
@ -382,7 +382,7 @@ void CGM_Driver::InitializeWidthMap (const Handle(Aspect_WidthMap)& aWidthMap)
|
|||||||
if (WIDTHMAP)
|
if (WIDTHMAP)
|
||||||
delete[] WIDTHMAP;
|
delete[] WIDTHMAP;
|
||||||
WIDTHMAP = new float[Size];
|
WIDTHMAP = new float[Size];
|
||||||
memset (WIDTHMAP, 0, sizeof(WIDTHMAP));
|
memset (WIDTHMAP, 0, Size * sizeof(float));
|
||||||
for (Standard_Integer i=1; i<= Size; i++) {
|
for (Standard_Integer i=1; i<= Size; i++) {
|
||||||
Standard_Real w = aWidthMap->Entry(i).Width();
|
Standard_Real w = aWidthMap->Entry(i).Width();
|
||||||
WIDTHMAP[aWidthMap->Entry(i).Index()] = (float)w;
|
WIDTHMAP[aWidthMap->Entry(i).Index()] = (float)w;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user