Fix -Wsign-compare

This commit is contained in:
Robin Gareus 2019-09-03 05:01:59 +02:00
parent 9970a243ec
commit a3673809cf
No known key found for this signature in database
GPG key ID: A090BCE02CF57F04
3 changed files with 5 additions and 5 deletions

View file

@ -384,7 +384,7 @@ LocalCandidatePYIN::getRemainingFeatures()
} }
vector<float> mpOut = mp.process(tempPitchProb); vector<float> mpOut = mp.process(tempPitchProb);
float prevFreq = 0; //float prevFreq = 0;
for (size_t iFrame = 0; iFrame < nFrame; ++iFrame) for (size_t iFrame = 0; iFrame < nFrame; ++iFrame)
{ {
if (mpOut[iFrame] > 0) { if (mpOut[iFrame] > 0) {
@ -392,7 +392,7 @@ LocalCandidatePYIN::getRemainingFeatures()
pitchTracks[iCandidate][iFrame] = mpOut[iFrame]; pitchTracks[iCandidate][iFrame] = mpOut[iFrame];
freqSum[iCandidate] += mpOut[iFrame]; freqSum[iCandidate] += mpOut[iFrame];
freqNumber[iCandidate]++; freqNumber[iCandidate]++;
prevFreq = mpOut[iFrame]; //prevFreq = mpOut[iFrame];
} }
} }

View file

@ -89,8 +89,8 @@ MonoPitchHMM::build()
for (size_t iPitch = 0; iPitch < m_nPitch; ++iPitch) for (size_t iPitch = 0; iPitch < m_nPitch; ++iPitch)
{ {
int theoreticalMinNextPitch = static_cast<int>(iPitch)-static_cast<int>(m_transitionWidth/2); int theoreticalMinNextPitch = static_cast<int>(iPitch)-static_cast<int>(m_transitionWidth/2);
int minNextPitch = iPitch>m_transitionWidth/2 ? iPitch-m_transitionWidth/2 : 0; size_t minNextPitch = iPitch>m_transitionWidth/2 ? iPitch-m_transitionWidth/2 : 0;
int maxNextPitch = iPitch<m_nPitch-m_transitionWidth/2 ? iPitch+m_transitionWidth/2 : m_nPitch-1; size_t maxNextPitch = iPitch<m_nPitch-m_transitionWidth/2 ? iPitch+m_transitionWidth/2 : m_nPitch-1;
// WEIGHT VECTOR // WEIGHT VECTOR
double weightSum = 0; double weightSum = 0;

View file

@ -28,7 +28,7 @@ YinUtil::slowDifference(const double *in, double *yinBuffer, const size_t yinBuf
double delta ; double delta ;
int startPoint = 0; int startPoint = 0;
int endPoint = 0; int endPoint = 0;
for (int i = 1; i < yinBufferSize; ++i) { for (size_t i = 1; i < yinBufferSize; ++i) {
yinBuffer[i] = 0; yinBuffer[i] = 0;
startPoint = yinBufferSize/2 - i/2; startPoint = yinBufferSize/2 - i/2;
endPoint = startPoint + yinBufferSize; endPoint = startPoint + yinBufferSize;