Mercurial > hg > vamp-plugin-sdk
diff examples/FixedTempoEstimator.cpp @ 398:7d59dd1ba5de
Add -Wextra, fix a couple of warnings it throws up
author | Chris Cannam |
---|---|
date | Tue, 16 Jun 2015 10:54:54 +0100 |
parents | 7178510d747a |
children | d129bf797f24 |
line wrap: on
line diff
--- a/examples/FixedTempoEstimator.cpp Tue Jun 16 10:26:12 2015 +0100 +++ b/examples/FixedTempoEstimator.cpp Tue Jun 16 10:54:54 2015 +0100 @@ -431,7 +431,7 @@ if (k0 >= 0 && k0 < int(n/2)) { - int kmax = 0, kmin = 0; + int kmax = 0; float kvmax = 0, kvmin = 0; bool have = false; @@ -439,8 +439,8 @@ if (k < 0 || k >= n/2) continue; - if (!have || (m_r[k] > kvmax)) { kmax = k; kvmax = m_r[k]; } - if (!have || (m_r[k] < kvmin)) { kmin = k; kvmin = m_r[k]; } + if (!have || (m_r[k] > kvmax)) { kvmax = m_r[k]; kmax = k; } + if (!have || (m_r[k] < kvmin)) { kvmin = m_r[k]; } have = true; }