diff options
author | Max Kellermann <max@duempel.org> | 2013-09-27 12:11:37 +0200 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2013-09-27 12:11:37 +0200 |
commit | c5d05ac0cf18dbd3d04534de240c437f8b07bd28 (patch) | |
tree | 5e69c019f69cc6f2f1d99c71448338d855bf4898 /src/decoder/FlacCommon.cxx | |
parent | 939003c1f1a8ed9f6e3fe677a63e1686fe35d929 (diff) | |
download | mpd-c5d05ac0cf18dbd3d04534de240c437f8b07bd28.tar.gz mpd-c5d05ac0cf18dbd3d04534de240c437f8b07bd28.tar.xz mpd-c5d05ac0cf18dbd3d04534de240c437f8b07bd28.zip |
DecoderCommand: convert to strictly-typed enum
Diffstat (limited to 'src/decoder/FlacCommon.cxx')
-rw-r--r-- | src/decoder/FlacCommon.cxx | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/src/decoder/FlacCommon.cxx b/src/decoder/FlacCommon.cxx index 62409d3cc..9f5d81f85 100644 --- a/src/decoder/FlacCommon.cxx +++ b/src/decoder/FlacCommon.cxx @@ -158,7 +158,6 @@ flac_common_write(struct flac_data *data, const FLAC__Frame * frame, const FLAC__int32 *const buf[], FLAC__uint64 nbytes) { - enum decoder_command cmd; void *buffer; unsigned bit_rate; @@ -178,19 +177,19 @@ flac_common_write(struct flac_data *data, const FLAC__Frame * frame, else bit_rate = 0; - cmd = decoder_data(data->decoder, data->input_stream, - buffer, buffer_size, - bit_rate); + auto cmd = decoder_data(data->decoder, data->input_stream, + buffer, buffer_size, + bit_rate); data->next_frame += frame->header.blocksize; switch (cmd) { - case DECODE_COMMAND_NONE: - case DECODE_COMMAND_START: + case DecoderCommand::NONE: + case DecoderCommand::START: break; - case DECODE_COMMAND_STOP: + case DecoderCommand::STOP: return FLAC__STREAM_DECODER_WRITE_STATUS_ABORT; - case DECODE_COMMAND_SEEK: + case DecoderCommand::SEEK: return FLAC__STREAM_DECODER_WRITE_STATUS_CONTINUE; } |