From 8a5144a927fb2659bc80d18620121d99cfcf1edc Mon Sep 17 00:00:00 2001 From: "arseny.kapoulkine" Date: Fri, 19 Aug 2011 04:25:13 +0000 Subject: Fixed unspecified bool conversion for MSVC CLR for the case when pugixml is compiled as unmanaged and calling code is compiled as managed. Fixes issue 121. git-svn-id: http://pugixml.googlecode.com/svn/trunk@817 99668b35-9821-0410-8761-19e4c4f06640 --- tests/helpers.hpp | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'tests/helpers.hpp') diff --git a/tests/helpers.hpp b/tests/helpers.hpp index abe6626..172f231 100644 --- a/tests/helpers.hpp +++ b/tests/helpers.hpp @@ -13,8 +13,17 @@ template static void generic_bool_ops_test(const T& obj) CHECK(obj); CHECK(!!obj); +#ifdef _MSC_VER +# pragma warning(push) +# pragma warning(disable: 4800) // forcing value to bool 'true' or 'false' (performance warning) - we really want to just cast to bool instead of !! +#endif + bool b1 = null, b2 = obj; +#ifdef _MSC_VER +# pragma warning(pop) +#endif + CHECK(!b1); CHECK(b2); -- cgit v1.2.3