Mercurial > hg > svgui
comparison widgets/WindowShapePreview.cpp @ 1153:c5a82068bd60 3.0-integration
Fix completely bogus allocation that was only shown up because of a compiler warning for int->float conversion possibly restricting value range!
author | Chris Cannam |
---|---|
date | Thu, 20 Oct 2016 14:06:05 +0100 |
parents | 0edfed2c8482 |
children | 07e8ac88bcce |
comparison
equal
deleted
inserted
replaced
1152:fc00a06feecd | 1153:c5a82068bd60 |
---|---|
66 timePainter.setRenderHint(QPainter::Antialiasing, true); | 66 timePainter.setRenderHint(QPainter::Antialiasing, true); |
67 timePainter.drawPath(path); | 67 timePainter.drawPath(path); |
68 | 68 |
69 path = QPainterPath(); | 69 path = QPainterPath(); |
70 | 70 |
71 float *acc = new float(w); | 71 float *acc = new float[w]; |
72 for (int i = 0; i < w; ++i) acc[i] = 0.f; | 72 for (int i = 0; i < w; ++i) acc[i] = 0.f; |
73 for (int j = 0; j < 3; ++j) { | 73 for (int j = 0; j < 3; ++j) { |
74 for (int i = 0; i < step * 2; ++i) { | 74 for (int i = 0; i < step * 2; ++i) { |
75 acc[j * step + i] += windower.getValue(i); | 75 acc[j * step + i] += windower.getValue(i); |
76 } | 76 } |