diff options
author | Max Kellermann <max@duempel.org> | 2013-10-28 23:29:23 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2013-10-28 23:29:23 +0100 |
commit | 0ad2eb34c74dc128e7884552ef1f930f3f495066 (patch) | |
tree | 58d66124d2922730ba2bff0bd659c0f6e9b4fad5 /src/decoder/DsdiffDecoderPlugin.cxx | |
parent | 0e8a15e813611af3c96f765386c94c7fc5f9343d (diff) | |
download | mpd-0ad2eb34c74dc128e7884552ef1f930f3f495066.tar.gz mpd-0ad2eb34c74dc128e7884552ef1f930f3f495066.tar.xz mpd-0ad2eb34c74dc128e7884552ef1f930f3f495066.zip |
decoder/dsdlib: add class DsdUint64
Merge lots of duplicate code.
Diffstat (limited to 'src/decoder/DsdiffDecoderPlugin.cxx')
-rw-r--r-- | src/decoder/DsdiffDecoderPlugin.cxx | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/decoder/DsdiffDecoderPlugin.cxx b/src/decoder/DsdiffDecoderPlugin.cxx index 939904d11..1dc7c7c6a 100644 --- a/src/decoder/DsdiffDecoderPlugin.cxx +++ b/src/decoder/DsdiffDecoderPlugin.cxx @@ -43,22 +43,21 @@ struct DsdiffHeader { DsdId id; - uint32_t size_high, size_low; + DsdUint64 size; DsdId format; }; struct DsdiffChunkHeader { DsdId id; - uint32_t size_high, size_low; + DsdUint64 size; /** * Read the "size" attribute from the specified header, converting it * to the host byte order if needed. */ - gcc_const + constexpr uint64_t GetSize() const { - return (uint64_t(FromBE32(size_high)) << 32) | - uint64_t(FromBE32(size_low)); + return size.Read(); } }; |