From fc1214e991682f58c74b439c15c8ad308c25d594 Mon Sep 17 00:00:00 2001 From: hogliux Date: Mon, 26 Sep 2016 15:45:38 +0000 Subject: [PATCH] Fixed ambiguous sign in AudioThumbnail implementation --- .../juce_audio_utils/gui/juce_AudioThumbnail.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/modules/juce_audio_utils/gui/juce_AudioThumbnail.cpp b/modules/juce_audio_utils/gui/juce_AudioThumbnail.cpp index 8b06ecb2e4..45f0820931 100644 --- a/modules/juce_audio_utils/gui/juce_AudioThumbnail.cpp +++ b/modules/juce_audio_utils/gui/juce_AudioThumbnail.cpp @@ -30,19 +30,19 @@ struct AudioThumbnail::MinMaxValue values[1] = 0; } - inline void set (const char newMin, const char newMax) noexcept + inline void set (const int8 newMin, const int8 newMax) noexcept { values[0] = newMin; values[1] = newMax; } - inline char getMinValue() const noexcept { return values[0]; } - inline char getMaxValue() const noexcept { return values[1]; } + inline int8 getMinValue() const noexcept { return values[0]; } + inline int8 getMaxValue() const noexcept { return values[1]; } inline void setFloat (Range newRange) noexcept { - values[0] = (char) jlimit (-128, 127, roundFloatToInt (newRange.getStart() * 127.0f)); - values[1] = (char) jlimit (-128, 127, roundFloatToInt (newRange.getEnd() * 127.0f)); + values[0] = (int8) jlimit (-128, 127, roundFloatToInt (newRange.getStart() * 127.0f)); + values[1] = (int8) jlimit (-128, 127, roundFloatToInt (newRange.getEnd() * 127.0f)); if (values[0] == values[1]) { @@ -68,7 +68,7 @@ struct AudioThumbnail::MinMaxValue inline void write (OutputStream& output) { output.write (values, 2); } private: - char values[2]; + int8 values[2]; }; //============================================================================== @@ -287,8 +287,8 @@ public: { endSample = jmin (endSample, data.size() - 1); - char mx = -128; - char mn = 127; + int8 mx = -128; + int8 mn = 127; while (startSample <= endSample) {