Skip to content

Commit

Permalink
Merge pull request #17 from introlab/fix-warnings
Browse files Browse the repository at this point in the history
Fix GCC warnings on Ubuntu 20.04
  • Loading branch information
philippewarren authored Dec 5, 2024
2 parents 51d5d72 + 903b441 commit 05f8774
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ namespace introlab
void shift(const T& value);
const T& operator[](int64_t i) const;

const std::size_t size() const;
std::size_t size() const;
};

template<class T>
Expand Down Expand Up @@ -91,7 +91,7 @@ namespace introlab
}

template<class T>
inline const std::size_t ShiftRegister<T>::size() const
inline std::size_t ShiftRegister<T>::size() const
{
return m_data.size();
}
Expand Down
4 changes: 2 additions & 2 deletions MusicBeatDetector/src/Obtain/BpmEstimator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ BpmEstimator::BpmEstimator(
float maxBpm,
size_t candidateCount)
: m_ossSamplingFrequency(ossSamplingFrequency),
m_crossCorrelationCalculator(ossWindowSize),
m_candidateCount(candidateCount)
m_candidateCount(candidateCount),
m_crossCorrelationCalculator(ossWindowSize)
{
if (minBpm <= 0 || maxBpm <= 0)
{
Expand Down
2 changes: 1 addition & 1 deletion MusicBeatDetector/src/Obtain/OssCalculator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ float OssCalculator::calculateFlux()
float OssCalculator::calculateOss()
{
float oss = 0;
for (int64_t i = 0; i < m_fluxShiftRegister.size(); i++)
for (size_t i = 0; i < m_fluxShiftRegister.size(); i++)
{
oss += m_fluxShiftRegister[i] * m_fluxHamming(i);
}
Expand Down

0 comments on commit 05f8774

Please sign in to comment.