summaryrefslogtreecommitdiffstats
path: root/googletest/include/gtest/internal/gtest-port.h
diff options
context:
space:
mode:
authorGennadiy Civil <misterg@google.com>2018-10-29 17:46:24 (GMT)
committerGennadiy Civil <misterg@google.com>2018-10-29 17:46:24 (GMT)
commite9085769d4819f8491a5ab19e9e3813144e6aa13 (patch)
tree55a2496790bc46370f84234d179db810926a6d95 /googletest/include/gtest/internal/gtest-port.h
parent80b43d900b8ed44e16b306682d47d73175cecc7f (diff)
parent3feffddd1e8381209a48c24587e36e030051499f (diff)
downloadgoogletest-e9085769d4819f8491a5ab19e9e3813144e6aa13.zip
googletest-e9085769d4819f8491a5ab19e9e3813144e6aa13.tar.gz
googletest-e9085769d4819f8491a5ab19e9e3813144e6aa13.tar.bz2
Merge pull request #1941 from barkovv:master
PiperOrigin-RevId: 219134349
Diffstat (limited to 'googletest/include/gtest/internal/gtest-port.h')
-rw-r--r--googletest/include/gtest/internal/gtest-port.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/googletest/include/gtest/internal/gtest-port.h b/googletest/include/gtest/internal/gtest-port.h
index 36bd405..5e302ae 100644
--- a/googletest/include/gtest/internal/gtest-port.h
+++ b/googletest/include/gtest/internal/gtest-port.h
@@ -1305,13 +1305,13 @@ inline To DownCast_(From* f) { // so we only accept pointers
GTEST_INTENTIONAL_CONST_COND_PUSH_()
if (false) {
GTEST_INTENTIONAL_CONST_COND_POP_()
- const To to = NULL;
- ::testing::internal::ImplicitCast_<From*>(to);
+ const To to = nullptr;
+ ::testing::internal::ImplicitCast_<From*>(to);
}
#if GTEST_HAS_RTTI
// RTTI: debug mode only!
- GTEST_CHECK_(f == nullptr || dynamic_cast<To>(f) != NULL);
+ GTEST_CHECK_(f == nullptr || dynamic_cast<To>(f) != nullptr);
#endif
return static_cast<To>(f);
}
@@ -2334,12 +2334,12 @@ inline const char* GetEnv(const char* name) {
#if GTEST_OS_WINDOWS_MOBILE || GTEST_OS_WINDOWS_PHONE || GTEST_OS_WINDOWS_RT
// We are on Windows CE, which has no environment variables.
static_cast<void>(name); // To prevent 'unused argument' warning.
- return NULL;
+ return nullptr;
#elif defined(__BORLANDC__) || defined(__SunOS_5_8) || defined(__SunOS_5_9)
// Environment variables which we programmatically clear will be set to the
// empty string rather than unset (NULL). Handle that case.
const char* const env = getenv(name);
- return (env != NULL && env[0] != '\0') ? env : NULL;
+ return (env != nullptr && env[0] != '\0') ? env : nullptr;
#else
return getenv(name);
#endif