From e73cf452a50801cf2adeb600b225ae17156f40f1 Mon Sep 17 00:00:00 2001 From: vladlosev Date: Wed, 13 Apr 2011 22:12:00 +0000 Subject: [PATCH] Corrects condition to compile out MSVC's pragmas. This fixes the build on MinGW. --- include/gmock/gmock-matchers.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/include/gmock/gmock-matchers.h b/include/gmock/gmock-matchers.h index dfb72599..f401725b 100644 --- a/include/gmock/gmock-matchers.h +++ b/include/gmock/gmock-matchers.h @@ -1392,15 +1392,15 @@ class TrulyMatcher { template bool MatchAndExplain(T& x, // NOLINT MatchResultListener* /* listener */) const { -#if GTEST_OS_WINDOWS +#if _MSC_VER // MSVC warns about converting a value into bool (warning 4800). # pragma warning(push) // Saves the current warning state. # pragma warning(disable:4800) // Temporarily disables warning 4800. -#endif // GTEST_OS_WINDOWS +#endif return predicate_(x); -#if GTEST_OS_WINDOWS +#if _MSC_VER # pragma warning(pop) // Restores the warning state. -#endif // GTEST_OS_WINDOWS +#endif } void DescribeTo(::std::ostream* os) const {