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/DecoderInternal.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 '')
-rw-r--r-- | src/DecoderInternal.cxx | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/DecoderInternal.cxx b/src/DecoderInternal.cxx index 0c9a10436..307a3550b 100644 --- a/src/DecoderInternal.cxx +++ b/src/DecoderInternal.cxx @@ -41,11 +41,11 @@ decoder::~decoder() * All chunks are full of decoded data; wait for the player to free * one. */ -static enum decoder_command +static DecoderCommand need_chunks(struct decoder_control *dc, bool do_wait) { - if (dc->command == DECODE_COMMAND_STOP || - dc->command == DECODE_COMMAND_SEEK) + if (dc->command == DecoderCommand::STOP || + dc->command == DecoderCommand::SEEK) return dc->command; if (do_wait) { @@ -55,14 +55,14 @@ need_chunks(struct decoder_control *dc, bool do_wait) return dc->command; } - return DECODE_COMMAND_NONE; + return DecoderCommand::NONE; } struct music_chunk * decoder_get_chunk(struct decoder *decoder) { struct decoder_control *dc = decoder->dc; - enum decoder_command cmd; + DecoderCommand cmd; assert(decoder != NULL); @@ -84,7 +84,7 @@ decoder_get_chunk(struct decoder *decoder) dc->Lock(); cmd = need_chunks(dc, true); dc->Unlock(); - } while (cmd == DECODE_COMMAND_NONE); + } while (cmd == DecoderCommand::NONE); return NULL; } |