From c5d05ac0cf18dbd3d04534de240c437f8b07bd28 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Fri, 27 Sep 2013 12:11:37 +0200 Subject: DecoderCommand: convert to strictly-typed enum --- src/decoder/GmeDecoderPlugin.cxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/decoder/GmeDecoderPlugin.cxx') diff --git a/src/decoder/GmeDecoderPlugin.cxx b/src/decoder/GmeDecoderPlugin.cxx index cc31c6bab..dbe1d000f 100644 --- a/src/decoder/GmeDecoderPlugin.cxx +++ b/src/decoder/GmeDecoderPlugin.cxx @@ -174,7 +174,7 @@ gme_file_decode(struct decoder *decoder, const char *path_fs) gme_set_fade(emu, ti->length); /* play */ - enum decoder_command cmd; + DecoderCommand cmd; do { short buf[GME_BUFFER_SAMPLES]; gme_err = gme_play(emu, GME_BUFFER_SAMPLES, buf); @@ -184,7 +184,7 @@ gme_file_decode(struct decoder *decoder, const char *path_fs) } cmd = decoder_data(decoder, nullptr, buf, sizeof(buf), 0); - if (cmd == DECODE_COMMAND_SEEK) { + if (cmd == DecoderCommand::SEEK) { float where = decoder_seek_where(decoder); gme_err = gme_seek(emu, int(where * 1000)); if (gme_err != nullptr) @@ -194,7 +194,7 @@ gme_file_decode(struct decoder *decoder, const char *path_fs) if (gme_track_ended(emu)) break; - } while (cmd != DECODE_COMMAND_STOP); + } while (cmd != DecoderCommand::STOP); gme_free_info(ti); gme_delete(emu); -- cgit v1.2.3