diff options
author | Erik de Castro Lopo <erikd@mega-nerd.com> | 2014-07-04 08:31:57 +1000 |
---|---|---|
committer | Erik de Castro Lopo <erikd@mega-nerd.com> | 2014-07-04 08:32:01 +1000 |
commit | 5e8854fa8477296850940427d32c03604a900699 (patch) | |
tree | d83e93919a395af749479a2ede3a22218ff3dec7 /src/flac | |
parent | eda98c49a84f7c414eea154a312bd146c3959986 (diff) | |
download | flac-5e8854fa8477296850940427d32c03604a900699.tar.gz |
src/ : Remove un-needed MSVC6 workaround.
MSVC6 was not able to cast from a uint64_t to a double and this
commit removes some #ifdef hackery designed to work around this
problem.
Patch-from: lvqcl <lvqcl.mail@gmail.com>
Diffstat (limited to 'src/flac')
-rw-r--r-- | src/flac/decode.c | 5 | ||||
-rw-r--r-- | src/flac/encode.c | 6 |
2 files changed, 0 insertions, 11 deletions
diff --git a/src/flac/decode.c b/src/flac/decode.c index e98c07a8..5e5e17ad 100644 --- a/src/flac/decode.c +++ b/src/flac/decode.c @@ -1429,12 +1429,7 @@ void print_error_with_state(const DecoderSession *d, const char *message) void print_stats(const DecoderSession *decoder_session) { if(flac__utils_verbosity_ >= 2) { -#if defined _MSC_VER || defined __MINGW32__ - /* with MSVC you have to spoon feed it the casting */ - const double progress = (double)(FLAC__int64)decoder_session->samples_processed / (double)(FLAC__int64)decoder_session->total_samples * 100.0; -#else const double progress = (double)decoder_session->samples_processed / (double)decoder_session->total_samples * 100.0; -#endif if(decoder_session->total_samples > 0) { if ((unsigned)floor(progress + 0.5) == 100) diff --git a/src/flac/encode.c b/src/flac/encode.c index 67fbc745..0079a504 100644 --- a/src/flac/encode.c +++ b/src/flac/encode.c @@ -2450,14 +2450,8 @@ void encoder_progress_callback(const FLAC__StreamEncoder *encoder, FLAC__uint64 const FLAC__uint64 uesize = e->unencoded_size; -#if defined _MSC_VER || defined __MINGW32__ - /* with MSVC you have to spoon feed it the casting */ - e->progress = e->total_samples_to_encode ? (double)(FLAC__int64)samples_written / (double)(FLAC__int64)e->total_samples_to_encode : 0; - e->compression_ratio = (e->progress && uesize) ? (double)(FLAC__int64)e->bytes_written / ((double)(FLAC__int64)uesize * min(1.0, e->progress)) : 0; -#else e->progress = e->total_samples_to_encode ? (double)samples_written / (double)e->total_samples_to_encode : 0; e->compression_ratio = (e->progress && uesize) ? (double)e->bytes_written / ((double)uesize * min(1.0, e->progress)) : 0; -#endif (void)encoder, (void)total_frames_estimate; |