From f5902a474cff232d28823060c5545e5c7ed18ded Mon Sep 17 00:00:00 2001 From: Erik de Castro Lopo Date: Fri, 14 Mar 2014 15:15:48 +1100 Subject: [PATCH] Fix pragma warning. Patch-from: lvqcl --- include/FLAC++/metadata.h | 3 +-- src/test_libFLAC++/encoders.cpp | 5 +++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/include/FLAC++/metadata.h b/include/FLAC++/metadata.h index afa157e5..4031eb69 100644 --- a/include/FLAC++/metadata.h +++ b/include/FLAC++/metadata.h @@ -241,8 +241,7 @@ namespace FLAC { { return (bool)::FLAC__metadata_object_is_equal(object_, object); } #ifdef _MSC_VER -// @@@ how to re-enable? the following doesn't work -// #pragma warning ( enable : 4800 ) +#pragma warning ( default : 4800 ) #endif inline bool Prototype::operator!=(const Prototype &object) const diff --git a/src/test_libFLAC++/encoders.cpp b/src/test_libFLAC++/encoders.cpp index e484c94a..64939407 100644 --- a/src/test_libFLAC++/encoders.cpp +++ b/src/test_libFLAC++/encoders.cpp @@ -35,6 +35,11 @@ extern "C" { #include #include "share/compat.h" +#ifdef _MSC_VER +// warning C4800: 'int' : forcing to bool 'true' or 'false' (performance warning) +#pragma warning ( disable : 4800 ) +#endif + typedef enum { LAYER_STREAM = 0, /* FLAC__stream_encoder_init_stream() without seeking */ LAYER_SEEKABLE_STREAM, /* FLAC__stream_encoder_init_stream() with seeking */