projects
/
occt.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9e4c2fb
)
0023268: cppcheck warning: Using size of pointer WIDTHMAP instead of size of its...
author
Pawel
<pawel-kowalski@wp.pl>
Thu, 12 Jul 2012 11:13:58 +0000
(13:13 +0200)
committer
Pawel
<pawel-kowalski@wp.pl>
Fri, 13 Jul 2012 13:38:04 +0000
(17:38 +0400)
Using the size of the array in bytes.
src/CGM/CGM_Driver.cxx
patch
|
blob
|
blame
|
history
diff --git
a/src/CGM/CGM_Driver.cxx
b/src/CGM/CGM_Driver.cxx
index
d2b63b7
..
a012245
100755
(executable)
--- a/
src/CGM/CGM_Driver.cxx
+++ b/
src/CGM/CGM_Driver.cxx
@@
-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;