From 270a551cb5a078909c1ec68eb2143cf7a2322e2c Mon Sep 17 00:00:00 2001 From: "zhanyong.wan" Date: Tue, 18 Jun 2013 18:44:25 +0000 Subject: Fixes compatibility with C++11: (1 - 1) is no longer a NULL pointer constant. git-svn-id: http://googletest.googlecode.com/svn/trunk@655 861a406c-534a-0410-8894-cb66d6ee9925 --- src/gtest.cc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/gtest.cc') diff --git a/src/gtest.cc b/src/gtest.cc index 57719aa..d6552f2 100644 --- a/src/gtest.cc +++ b/src/gtest.cc @@ -182,6 +182,10 @@ bool g_help_flag = false; } // namespace internal +static const char* GetDefaultFilter() { + return kUniversalFilter; +} + GTEST_DEFINE_bool_( also_run_disabled_tests, internal::BoolFromGTestEnv("also_run_disabled_tests", false), @@ -208,7 +212,7 @@ GTEST_DEFINE_string_( GTEST_DEFINE_string_( filter, - internal::StringFromGTestEnv("filter", kUniversalFilter), + internal::StringFromGTestEnv("filter", GetDefaultFilter()), "A colon-separated list of glob (not regex) patterns " "for filtering the tests to run, optionally followed by a " "'-' and a : separated list of negative patterns (tests to " -- cgit v1.2.3