Remove unneccessary "#if _MSC_VER"
The GTEST_DISABLE_MSC_WARNINGS macros already have an _MSC_VER check. This change also adds a missing GTEST_DISABLE_MSC_WARNINGS_POP_ in gtest-typed-test_test.cc. PiperOrigin-RevId: 506636248 Change-Id: Ifdc044528f5448fbf0175887d1671f1e1f3040b9
This commit is contained in:
		
				
					committed by
					
						
						Copybara-Service
					
				
			
			
				
	
			
			
			
						parent
						
							6f21175f57
						
					
				
				
					commit
					4f7c63d991
				
			@@ -39,9 +39,7 @@
 | 
				
			|||||||
#include "gtest/gtest.h"
 | 
					#include "gtest/gtest.h"
 | 
				
			||||||
#include "src/gtest-internal-inl.h"
 | 
					#include "src/gtest-internal-inl.h"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#if _MSC_VER
 | 
					 | 
				
			||||||
GTEST_DISABLE_MSC_WARNINGS_PUSH_(4127 /* conditional expression is constant */)
 | 
					GTEST_DISABLE_MSC_WARNINGS_PUSH_(4127 /* conditional expression is constant */)
 | 
				
			||||||
#endif  //  _MSC_VER
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
#if GTEST_IS_THREADSAFE
 | 
					#if GTEST_IS_THREADSAFE
 | 
				
			||||||
using testing::ScopedFakeTestPartResultReporter;
 | 
					using testing::ScopedFakeTestPartResultReporter;
 | 
				
			||||||
@@ -1046,8 +1044,6 @@ int main(int argc, char** argv) {
 | 
				
			|||||||
  // are registered, and torn down in the reverse order.
 | 
					  // are registered, and torn down in the reverse order.
 | 
				
			||||||
  testing::AddGlobalTestEnvironment(new FooEnvironment);
 | 
					  testing::AddGlobalTestEnvironment(new FooEnvironment);
 | 
				
			||||||
  testing::AddGlobalTestEnvironment(new BarEnvironment);
 | 
					  testing::AddGlobalTestEnvironment(new BarEnvironment);
 | 
				
			||||||
#if _MSC_VER
 | 
					 | 
				
			||||||
  GTEST_DISABLE_MSC_WARNINGS_POP_()  //  4127
 | 
					  GTEST_DISABLE_MSC_WARNINGS_POP_()  //  4127
 | 
				
			||||||
#endif                               //  _MSC_VER
 | 
					 | 
				
			||||||
  return RunAllTests();
 | 
					  return RunAllTests();
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -36,9 +36,7 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
#include "gtest/gtest.h"
 | 
					#include "gtest/gtest.h"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#if _MSC_VER
 | 
					 | 
				
			||||||
GTEST_DISABLE_MSC_WARNINGS_PUSH_(4127 /* conditional expression is constant */)
 | 
					GTEST_DISABLE_MSC_WARNINGS_PUSH_(4127 /* conditional expression is constant */)
 | 
				
			||||||
#endif  //  _MSC_VER
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
using testing::Test;
 | 
					using testing::Test;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -421,3 +419,5 @@ typedef Types<int, double, MyPair<int, int> > TrimTypes;
 | 
				
			|||||||
INSTANTIATE_TYPED_TEST_SUITE_P(My, TrimmedTest, TrimTypes);
 | 
					INSTANTIATE_TYPED_TEST_SUITE_P(My, TrimmedTest, TrimTypes);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
}  // namespace library2
 | 
					}  // namespace library2
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					GTEST_DISABLE_MSC_WARNINGS_POP_()  // 4127
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user