From dbe3b6eee43bb92b1cc291bee640cfdddcd30507 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Fri, 19 Dec 2014 11:47:25 +0100 Subject: [PATCH] decoder/ffmpeg: convert enums to constexpr --- src/decoder/plugins/FfmpegDecoderPlugin.cxx | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/decoder/plugins/FfmpegDecoderPlugin.cxx b/src/decoder/plugins/FfmpegDecoderPlugin.cxx index a3419d0ac..1b86f0d56 100644 --- a/src/decoder/plugins/FfmpegDecoderPlugin.cxx +++ b/src/decoder/plugins/FfmpegDecoderPlugin.cxx @@ -362,10 +362,8 @@ ffmpeg_sample_format(enum AVSampleFormat sample_fmt) static AVInputFormat * ffmpeg_probe(Decoder *decoder, InputStream &is) { - enum { - BUFFER_SIZE = 16384, - PADDING = 16, - }; + constexpr size_t BUFFER_SIZE = 16384; + constexpr size_t PADDING = 16; unsigned char buffer[BUFFER_SIZE]; size_t nbytes = decoder_read(decoder, is, buffer, BUFFER_SIZE);