comparison layer/SpectrogramLayer.cpp @ 848:856dbe997dcd

Remove redundant code (from coverity scan)
author Chris Cannam
date Wed, 03 Sep 2014 11:44:40 +0100
parents 4c8ca536b54f
children d7f6f60a8b30
comparison
equal deleted inserted replaced
847:312b92ffb04e 848:856dbe997dcd
2477 FFTModel *fft = getFFTModel(v); 2477 FFTModel *fft = getFFTModel(v);
2478 if (!fft) return false; 2478 if (!fft) return false;
2479 2479
2480 FFTModel::PeakSet peakfreqs; 2480 FFTModel::PeakSet peakfreqs;
2481 2481
2482 int px = -1, psx = -1; 2482 int psx = -1;
2483 2483
2484 #ifdef __GNUC__ 2484 #ifdef __GNUC__
2485 float values[maxbin - minbin + 1]; 2485 float values[maxbin - minbin + 1];
2486 #else 2486 #else
2487 float *values = (float *)alloca((maxbin - minbin + 1) * sizeof(float)); 2487 float *values = (float *)alloca((maxbin - minbin + 1) * sizeof(float));
2498 if (sx0 < 0) continue; 2498 if (sx0 < 0) continue;
2499 if (sx1 <= sx0) sx1 = sx0 + 1; 2499 if (sx1 <= sx0) sx1 = sx0 + 1;
2500 2500
2501 for (int sx = sx0; sx < sx1; ++sx) { 2501 for (int sx = sx0; sx < sx1; ++sx) {
2502 2502
2503 if (x == px && sx == psx) continue;
2504 if (sx < 0 || sx >= int(fft->getWidth())) continue; 2503 if (sx < 0 || sx >= int(fft->getWidth())) continue;
2505 2504
2506 if (!m_synchronous) { 2505 if (!m_synchronous) {
2507 if (!fft->isColumnAvailable(sx)) { 2506 if (!fft->isColumnAvailable(sx)) {
2508 #ifdef DEBUG_SPECTROGRAM_REPAINT 2507 #ifdef DEBUG_SPECTROGRAM_REPAINT