diff --git a/include/FLAC++/metadata.h b/include/FLAC++/metadata.h index 08b15b0e..2839d3b4 100644 --- a/include/FLAC++/metadata.h +++ b/include/FLAC++/metadata.h @@ -215,6 +215,11 @@ namespace FLAC { inline void set_reference(bool x) { is_reference_ = x; } }; +#ifdef _MSC_VER +// warning C4800: 'int' : forcing to bool 'true' or 'false' (performance warning) +#pragma warning ( disable : 4800 ) +#endif + inline bool Prototype::operator==(const Prototype &object) const { return (bool)::FLAC__metadata_object_is_equal(object_, object.object_); } @@ -224,6 +229,11 @@ namespace FLAC { inline bool Prototype::operator==(const ::FLAC__StreamMetadata *object) const { 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 ) +#endif + inline bool Prototype::operator!=(const Prototype &object) const { return !operator==(object); } diff --git a/src/libFLAC++/metadata.cpp b/src/libFLAC++/metadata.cpp index fd6e763e..ba0e0d30 100644 --- a/src/libFLAC++/metadata.cpp +++ b/src/libFLAC++/metadata.cpp @@ -34,6 +34,11 @@ #include // for malloc(), free() #include // for memcpy() etc. +#ifdef _MSC_VER +// warning C4800: 'int' : forcing to bool 'true' or 'false' (performance warning) +#pragma warning ( disable : 4800 ) +#endif + namespace FLAC { namespace Metadata { diff --git a/src/test_libFLAC++/decoders.cpp b/src/test_libFLAC++/decoders.cpp index d44d34dd..06453c2a 100644 --- a/src/test_libFLAC++/decoders.cpp +++ b/src/test_libFLAC++/decoders.cpp @@ -30,6 +30,11 @@ extern "C" { #include #include +#ifdef _MSC_VER +// warning C4800: 'int' : forcing to bool 'true' or 'false' (performance warning) +#pragma warning ( disable : 4800 ) +#endif + static ::FLAC__StreamMetadata streaminfo_, padding_, seektable_, application1_, application2_, vorbiscomment_, cuesheet_, unknown_; static ::FLAC__StreamMetadata *expected_metadata_sequence_[8]; static unsigned num_expected_; diff --git a/src/test_libOggFLAC++/decoders.cpp b/src/test_libOggFLAC++/decoders.cpp index 874515b6..9d89a2a4 100644 --- a/src/test_libOggFLAC++/decoders.cpp +++ b/src/test_libOggFLAC++/decoders.cpp @@ -30,6 +30,11 @@ extern "C" { #include #include +#ifdef _MSC_VER +// warning C4800: 'int' : forcing to bool 'true' or 'false' (performance warning) +#pragma warning ( disable : 4800 ) +#endif + static ::FLAC__StreamMetadata streaminfo_, padding_, seektable_, application1_, application2_, vorbiscomment_, cuesheet_, unknown_; static ::FLAC__StreamMetadata *expected_metadata_sequence_[8]; static unsigned num_expected_;