mirror of
https://github.com/Open-Cascade-SAS/OCCT.git
synced 2026-09-07 21:28:11 +08: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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user