# HG changeset patch # User Chris Cannam # Date 1435762434 -3600 # Node ID 1517d4c60e88ee851ec1c23063fcb908488591f9 # Parent 5fab8e4f5f19515cd3b9c6b4650df0e5f8d2fabb Fix a number of warnings in the 32-bit build diff -r 5fab8e4f5f19 -r 1517d4c60e88 data/fileio/CodedAudioFileReader.cpp --- 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)); } } diff -r 5fab8e4f5f19 -r 1517d4c60e88 data/fileio/WavFileReader.cpp --- 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; diff -r 5fab8e4f5f19 -r 1517d4c60e88 data/model/EditableDenseThreeDimensionalModel.cpp --- 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) { diff -r 5fab8e4f5f19 -r 1517d4c60e88 data/model/EditableDenseThreeDimensionalModel.h --- 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; diff -r 5fab8e4f5f19 -r 1517d4c60e88 data/model/ImageModel.h --- 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; diff -r 5fab8e4f5f19 -r 1517d4c60e88 data/model/SparseTimeValueModel.h --- 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; diff -r 5fab8e4f5f19 -r 1517d4c60e88 data/model/test/TestFFTModel.h --- 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);