diff options
author | Andreas Kling <kling@serenityos.org> | 2020-04-15 16:52:04 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2020-04-15 16:58:46 +0200 |
commit | b517670fc98a06f5ff3363486938d9e3b3935fe1 (patch) | |
tree | b5cf29ff1c25d634426a3f0d0fd0e76ea3efef95 /Libraries/LibAudio/WavLoader.cpp | |
parent | 0e10673c5898a7c68f9e78ede3fe982d9ca7492d (diff) | |
download | serenity-b517670fc98a06f5ff3363486938d9e3b3935fe1.zip |
LibAudio: Use NumericLimits<T>
Diffstat (limited to 'Libraries/LibAudio/WavLoader.cpp')
-rw-r--r-- | Libraries/LibAudio/WavLoader.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Libraries/LibAudio/WavLoader.cpp b/Libraries/LibAudio/WavLoader.cpp index a4dd4e6708..d42ee49f5a 100644 --- a/Libraries/LibAudio/WavLoader.cpp +++ b/Libraries/LibAudio/WavLoader.cpp @@ -25,11 +25,11 @@ */ #include <AK/BufferStream.h> +#include <AK/NumericLimits.h> #include <AK/OwnPtr.h> #include <LibAudio/WavLoader.h> #include <LibCore/File.h> #include <LibCore/IODeviceStreamReader.h> -#include <limits> namespace Audio { @@ -260,21 +260,21 @@ static double read_norm_sample_24(BufferStream& stream) value = sample1 << 8; value |= (sample2 << 16); value |= (sample3 << 24); - return double(value) / std::numeric_limits<i32>::max(); + return double(value) / NumericLimits<i32>::max(); } static double read_norm_sample_16(BufferStream& stream) { i16 sample = 0; stream >> sample; - return double(sample) / std::numeric_limits<i16>::max(); + return double(sample) / NumericLimits<i16>::max(); } static double read_norm_sample_8(BufferStream& stream) { u8 sample = 0; stream >> sample; - return double(sample) / std::numeric_limits<u8>::max(); + return double(sample) / NumericLimits<u8>::max(); } // ### can't const this because BufferStream is non-const |