Mercurial > hg > svcore
changeset 1110:1517d4c60e88
Fix a number of warnings in the 32-bit build
author | Chris Cannam |
---|---|
date | Wed, 01 Jul 2015 15:53:54 +0100 |
parents | 5fab8e4f5f19 |
children | 457a1a619c5f ed207f89aaef |
files | data/fileio/CodedAudioFileReader.cpp data/fileio/WavFileReader.cpp data/model/EditableDenseThreeDimensionalModel.cpp data/model/EditableDenseThreeDimensionalModel.h data/model/ImageModel.h data/model/SparseTimeValueModel.h data/model/test/TestFFTModel.h |
diffstat | 7 files changed, 17 insertions(+), 17 deletions(-) [+] |
line wrap: on
line diff
--- a/data/fileio/CodedAudioFileReader.cpp Fri Jun 12 12:41:19 2015 +0100 +++ b/data/fileio/CodedAudioFileReader.cpp Wed Jul 01 15:53:54 2015 +0100 @@ -439,15 +439,15 @@ sv_frame_t i = 0; sv_frame_t n = count * m_channelCount; - frames.resize(n); + frames.resize(size_t(n)); m_dataLock.lockForRead(); while (i < n && in_range_for(m_data, idx)) { - frames[i++] = m_data[idx++]; + frames[size_t(i++)] = m_data[size_t(idx++)]; } m_dataLock.unlock(); - frames.resize(i); + frames.resize(size_t(i)); } }
--- a/data/fileio/WavFileReader.cpp Fri Jun 12 12:41:19 2015 +0100 +++ b/data/fileio/WavFileReader.cpp Wed Jul 01 15:53:54 2015 +0100 @@ -147,7 +147,7 @@ } sv_frame_t n = count * m_fileInfo.channels; - m_buffer.resize(n); + m_buffer.resize(size_t(n)); sf_count_t readCount = 0; @@ -155,7 +155,7 @@ return SampleBlock(); } - m_buffer.resize(readCount * m_fileInfo.channels); + m_buffer.resize(size_t(readCount * m_fileInfo.channels)); m_lastStart = start; m_lastCount = readCount;
--- a/data/model/EditableDenseThreeDimensionalModel.cpp Fri Jun 12 12:41:19 2015 +0100 +++ b/data/model/EditableDenseThreeDimensionalModel.cpp Wed Jul 01 15:53:54 2015 +0100 @@ -342,7 +342,7 @@ // assert(values == expandAndRetrieve(index)); - long windowStart = index; + sv_frame_t windowStart = index; windowStart *= m_resolution; if (m_notifyOnAdd) {
--- a/data/model/EditableDenseThreeDimensionalModel.h Fri Jun 12 12:41:19 2015 +0100 +++ b/data/model/EditableDenseThreeDimensionalModel.h Wed Jul 01 15:53:54 2015 +0100 @@ -222,8 +222,8 @@ float m_maximum; bool m_haveExtents; bool m_notifyOnAdd; - long m_sinceLastNotifyMin; - long m_sinceLastNotifyMax; + sv_frame_t m_sinceLastNotifyMin; + sv_frame_t m_sinceLastNotifyMax; int m_completion; mutable QReadWriteLock m_lock;
--- a/data/model/ImageModel.h Fri Jun 12 12:41:19 2015 +0100 +++ b/data/model/ImageModel.h Wed Jul 01 15:53:54 2015 +0100 @@ -31,13 +31,13 @@ struct ImagePoint : public XmlExportable { public: - ImagePoint(long _frame) : frame(_frame) { } - ImagePoint(long _frame, QString _image, QString _label) : + ImagePoint(sv_frame_t _frame) : frame(_frame) { } + ImagePoint(sv_frame_t _frame, QString _image, QString _label) : frame(_frame), image(_image), label(_label) { } int getDimensions() const { return 1; } - long frame; + sv_frame_t frame; QString image; QString label;
--- a/data/model/SparseTimeValueModel.h Fri Jun 12 12:41:19 2015 +0100 +++ b/data/model/SparseTimeValueModel.h Wed Jul 01 15:53:54 2015 +0100 @@ -29,13 +29,13 @@ struct TimeValuePoint { public: - TimeValuePoint(long _frame) : frame(_frame), value(0.0f) { } - TimeValuePoint(long _frame, float _value, QString _label) : + TimeValuePoint(sv_frame_t _frame) : frame(_frame), value(0.0f) { } + TimeValuePoint(sv_frame_t _frame, float _value, QString _label) : frame(_frame), value(_value), label(_label) { } int getDimensions() const { return 2; } - long frame; + sv_frame_t frame; float value; QString label;
--- a/data/model/test/TestFFTModel.h Fri Jun 12 12:41:19 2015 +0100 +++ b/data/model/test/TestFFTModel.h Wed Jul 01 15:53:54 2015 +0100 @@ -55,7 +55,7 @@ float eRe = expectedValues[ch][i].real(); float eIm = expectedValues[ch][i].imag(); if (reals[i] != eRe || imags[i] != eIm) { - cerr << "ERROR: output is not as expected for column " + cerr << "NOTE: output is not as expected for column " << i << " in channel " << ch << " (polar store = " << polar << ")" << endl; cerr << "expected : "; @@ -68,8 +68,8 @@ } cerr << endl; } - QCOMPARE(reals[i], eRe); - QCOMPARE(imags[i], eIm); + COMPARE_FUZZIER_F(reals[i], eRe); + COMPARE_FUZZIER_F(imags[i], eIm); } QCOMPARE(reals[hs1], 999.f); QCOMPARE(imags[hs1], 999.f);