Cleans up macro definitions.

This commit is contained in:
zhanyong.wan
2009-02-23 23:37:29 +00:00
parent 1bee7b2f1d
commit 652540a278
11 changed files with 38 additions and 38 deletions

View File

@@ -678,12 +678,12 @@ class SetArrayArgumentAction {
// Microsoft compiler deprecates ::std::copy, so we want to suppress warning
// 4996 (Function call with parameters that may be unsafe) there.
#ifdef GTEST_OS_WINDOWS
#if GTEST_OS_WINDOWS
#pragma warning(push) // Saves the current warning state.
#pragma warning(disable:4996) // Temporarily disables warning 4996.
#endif // GTEST_OS_WINDOWS
::std::copy(first_, last_, ::std::tr1::get<N>(args));
#ifdef GTEST_OS_WINDOWS
#if GTEST_OS_WINDOWS
#pragma warning(pop) // Restores the warning state.
#endif // GTEST_OS_WINDOWS
}

View File

@@ -1141,13 +1141,13 @@ class TrulyMatcher {
// interested in the address of the argument.
template <typename T>
bool Matches(T& x) const {
#ifdef GTEST_OS_WINDOWS
#if GTEST_OS_WINDOWS
// 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
return predicate_(x);
#ifdef GTEST_OS_WINDOWS
#if GTEST_OS_WINDOWS
#pragma warning(pop) // Restores the warning state.
#endif // GTEST_OS_WINDOWS
}

View File

@@ -58,7 +58,7 @@
#include <tuple>
#endif // __GNUC__
#ifdef GTEST_OS_LINUX
#if GTEST_OS_LINUX
// On some platforms, <regex.h> needs someone to define size_t, and
// won't compile otherwise. We can #include it here as we already
@@ -85,7 +85,7 @@ namespace internal {
// For Windows, check the compiler version. At least VS 2005 SP1 is
// required to compile Google Mock.
#ifdef GTEST_OS_WINDOWS
#if GTEST_OS_WINDOWS
#if _MSC_VER < 1400
#error "At least Visual Studio 2005 SP1 is required to compile Google Mock."