Indents preprocessor directives.
This commit is contained in:
@@ -40,7 +40,7 @@
|
||||
#include <string>
|
||||
|
||||
#ifndef _WIN32_WCE
|
||||
#include <errno.h>
|
||||
# include <errno.h>
|
||||
#endif
|
||||
|
||||
#include "gmock/internal/gmock-internal-utils.h"
|
||||
|
||||
@@ -2228,8 +2228,8 @@ namespace testing {
|
||||
// is expanded and macro expansion cannot contain #pragma. Therefore
|
||||
// we suppress them here.
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(push)
|
||||
#pragma warning(disable:4100)
|
||||
# pragma warning(push)
|
||||
# pragma warning(disable:4100)
|
||||
#endif
|
||||
|
||||
// Various overloads for InvokeArgument<N>().
|
||||
@@ -2411,7 +2411,7 @@ ACTION_TEMPLATE(ReturnNew,
|
||||
}
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(pop)
|
||||
# pragma warning(pop)
|
||||
#endif
|
||||
|
||||
} // namespace testing
|
||||
|
||||
@@ -751,8 +751,8 @@ namespace testing {
|
||||
// is expanded and macro expansion cannot contain #pragma. Therefore
|
||||
// we suppress them here.
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(push)
|
||||
#pragma warning(disable:4100)
|
||||
# pragma warning(push)
|
||||
# pragma warning(disable:4100)
|
||||
#endif
|
||||
|
||||
// Various overloads for InvokeArgument<N>().
|
||||
@@ -817,7 +817,7 @@ ACTION_TEMPLATE(ReturnNew,
|
||||
]]
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(pop)
|
||||
# pragma warning(pop)
|
||||
#endif
|
||||
|
||||
} // namespace testing
|
||||
|
||||
@@ -1394,12 +1394,12 @@ class TrulyMatcher {
|
||||
MatchResultListener* /* listener */) const {
|
||||
#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.
|
||||
# pragma warning(push) // Saves the current warning state.
|
||||
# pragma warning(disable:4800) // Temporarily disables warning 4800.
|
||||
#endif // GTEST_OS_WINDOWS
|
||||
return predicate_(x);
|
||||
#if GTEST_OS_WINDOWS
|
||||
#pragma warning(pop) // Restores the warning state.
|
||||
# pragma warning(pop) // Restores the warning state.
|
||||
#endif // GTEST_OS_WINDOWS
|
||||
}
|
||||
|
||||
|
||||
@@ -136,8 +136,8 @@ WithArg(const InnerAction& action) {
|
||||
// is expanded and macro expansion cannot contain #pragma. Therefore
|
||||
// we suppress them here.
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(push)
|
||||
#pragma warning(disable:4100)
|
||||
# pragma warning(push)
|
||||
# pragma warning(disable:4100)
|
||||
#endif
|
||||
|
||||
// Action ReturnArg<k>() returns the k-th argument of the mock function.
|
||||
@@ -188,12 +188,12 @@ ACTION_TEMPLATE(SetArrayArgument,
|
||||
// Microsoft compiler deprecates ::std::copy, so we want to suppress warning
|
||||
// 4996 (Function call with parameters that may be unsafe) there.
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(push) // Saves the current warning state.
|
||||
#pragma warning(disable:4996) // Temporarily disables warning 4996.
|
||||
# pragma warning(push) // Saves the current warning state.
|
||||
# pragma warning(disable:4996) // Temporarily disables warning 4996.
|
||||
#endif
|
||||
::std::copy(first, last, ::std::tr1::get<k>(args));
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(pop) // Restores the warning state.
|
||||
# pragma warning(pop) // Restores the warning state.
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -213,19 +213,19 @@ ACTION_P(ReturnPointee, pointer) { return *pointer; }
|
||||
#if GTEST_HAS_EXCEPTIONS
|
||||
|
||||
// Suppresses the 'unreachable code' warning that VC generates in opt modes.
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(push) // Saves the current warning state.
|
||||
#pragma warning(disable:4702) // Temporarily disables warning 4702.
|
||||
#endif
|
||||
# ifdef _MSC_VER
|
||||
# pragma warning(push) // Saves the current warning state.
|
||||
# pragma warning(disable:4702) // Temporarily disables warning 4702.
|
||||
# endif
|
||||
ACTION_P(Throw, exception) { throw exception; }
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(pop) // Restores the warning state.
|
||||
#endif
|
||||
# ifdef _MSC_VER
|
||||
# pragma warning(pop) // Restores the warning state.
|
||||
# endif
|
||||
|
||||
#endif // GTEST_HAS_EXCEPTIONS
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(pop)
|
||||
# pragma warning(pop)
|
||||
#endif
|
||||
|
||||
} // namespace testing
|
||||
|
||||
@@ -1279,8 +1279,8 @@ class MockSpec {
|
||||
// the constructor only.
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(push) // Saves the current warning state.
|
||||
#pragma warning(disable:4355) // Temporarily disables warning 4355.
|
||||
# pragma warning(push) // Saves the current warning state.
|
||||
# pragma warning(disable:4355) // Temporarily disables warning 4355.
|
||||
#endif // _MSV_VER
|
||||
|
||||
// C++ treats the void type specially. For example, you cannot define
|
||||
@@ -1686,7 +1686,7 @@ class FunctionMockerBase : public UntypedFunctionMockerBase {
|
||||
}; // class FunctionMockerBase
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(pop) // Restores the warning state.
|
||||
# pragma warning(pop) // Restores the warning state.
|
||||
#endif // _MSV_VER
|
||||
|
||||
// Implements methods of FunctionMockerBase.
|
||||
|
||||
@@ -101,7 +101,7 @@ struct LinkedPtrLessThan {
|
||||
(defined(_MSC_VER) && !defined(_NATIVE_WCHAR_T_DEFINED))
|
||||
// wchar_t is a typedef.
|
||||
#else
|
||||
#define GMOCK_WCHAR_T_IS_NATIVE_ 1
|
||||
# define GMOCK_WCHAR_T_IS_NATIVE_ 1
|
||||
#endif
|
||||
|
||||
// signed wchar_t and unsigned wchar_t are NOT in the C++ standard.
|
||||
@@ -114,7 +114,8 @@ struct LinkedPtrLessThan {
|
||||
// To gcc,
|
||||
// wchar_t == signed wchar_t != unsigned wchar_t == unsigned int
|
||||
#ifdef __GNUC__
|
||||
#define GMOCK_HAS_SIGNED_WCHAR_T_ 1 // signed/unsigned wchar_t are valid types.
|
||||
// signed/unsigned wchar_t are valid types.
|
||||
# define GMOCK_HAS_SIGNED_WCHAR_T_ 1
|
||||
#endif
|
||||
|
||||
// In what follows, we use the term "kind" to indicate whether a type
|
||||
|
||||
@@ -53,7 +53,7 @@
|
||||
// For MS Visual C++, check the compiler version. At least VS 2003 is
|
||||
// required to compile Google Mock.
|
||||
#if defined(_MSC_VER) && _MSC_VER < 1310
|
||||
#error "At least Visual C++ 2003 (7.1) is required to compile Google Mock."
|
||||
# error "At least Visual C++ 2003 (7.1) is required to compile Google Mock."
|
||||
#endif
|
||||
|
||||
// Macro for referencing flags. This is public as we want the user to
|
||||
|
||||
Reference in New Issue
Block a user