Make sizeof more generic

This commit is contained in:
Mark Furneaux 2014-05-22 10:58:08 -04:00
parent 663b7430d8
commit f2a1defa2a
1 changed files with 1 additions and 1 deletions

View File

@ -40,7 +40,7 @@ RainbowDashAnalyzer::RainbowDashAnalyzer(QWidget* parent)
px_per_frame_(0),
x_offset_(0),
background_brush_(QColor(0x38, 0x88, 0x00)) {
memset(history_, 0, arraysize(history_) * sizeof(float));
memset(history_, 0, arraysize(history_) * sizeof(*history_));
for (int i = 0; i < kRainbowBands; ++i) {
colors_[i] = QPen(QColor::fromHsv(i * 255 / kRainbowBands, 255, 255),