summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorvladlosev <vladlosev@8415998a-534a-0410-bf83-d39667b30386>2011-04-13 22:12:00 +0000
committervladlosev <vladlosev@8415998a-534a-0410-bf83-d39667b30386>2011-04-13 22:12:00 +0000
commit913377dcd734c6e504e4d728722afc237fc43b39 (patch)
tree97b96a5c394d738c070aa61e8f67a04e42b99bf1
parente34bc1a113919bed266ec5204ca1705cf7b6a81e (diff)
downloadgooglemock-913377dcd734c6e504e4d728722afc237fc43b39.tar.gz
Corrects condition to compile out MSVC's pragmas. This fixes the build on MinGW.
git-svn-id: http://googlemock.googlecode.com/svn/trunk@380 8415998a-534a-0410-bf83-d39667b30386
-rw-r--r--include/gmock/gmock-matchers.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/include/gmock/gmock-matchers.h b/include/gmock/gmock-matchers.h
index dfb7259..f401725 100644
--- a/include/gmock/gmock-matchers.h
+++ b/include/gmock/gmock-matchers.h
@@ -1392,15 +1392,15 @@ class TrulyMatcher {
template <typename T>
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 {