diff options
author | Max Kellermann <max@duempel.org> | 2014-08-31 08:27:51 +0200 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2014-08-31 08:27:51 +0200 |
commit | 26bef5d20944d60b7bda1b1e6fc421e5d49e38b8 (patch) | |
tree | c0caa666842fe5979e92716543f1bc3f7f5aa230 /src/decoder/DecoderAPI.cxx | |
parent | cd6e0ff88aba5c671568cbc45138acb2c0d0d121 (diff) |
DecoderAPI: use std::min()
Diffstat (limited to 'src/decoder/DecoderAPI.cxx')
-rw-r--r-- | src/decoder/DecoderAPI.cxx | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/decoder/DecoderAPI.cxx b/src/decoder/DecoderAPI.cxx index 4d0b2fd48..c3cbb3a21 100644 --- a/src/decoder/DecoderAPI.cxx +++ b/src/decoder/DecoderAPI.cxx @@ -519,9 +519,7 @@ decoder_data(Decoder &decoder, continue; } - size_t nbytes = dest.size; - if (nbytes > length) - nbytes = length; + const size_t nbytes = std::min(dest.size, length); /* copy the buffer */ |