aboutsummaryrefslogtreecommitdiffstats
path: root/googlemock/src/gmock.cc
diff options
context:
space:
mode:
authorGennadiy Civil <gennadiycivil@users.noreply.github.com>2018-10-05 16:23:55 -0400
committerGitHub <noreply@github.com>2018-10-05 16:23:55 -0400
commit3149e0e88bf09841009851a478dd835fc557aaa1 (patch)
tree22e38a6ba9e82b964f620f55cddb03033e1ffc4b /googlemock/src/gmock.cc
parent4b82df5bb3fab5f6f19a41b7a232f54e37a66d6b (diff)
parent40f82ce56a4b416aa4631e48d1d07377793b18ee (diff)
downloadgoogletest-3149e0e88bf09841009851a478dd835fc557aaa1.tar.gz
googletest-3149e0e88bf09841009851a478dd835fc557aaa1.tar.bz2
googletest-3149e0e88bf09841009851a478dd835fc557aaa1.zip
Merge branch 'master' into python3-tests
Diffstat (limited to 'googlemock/src/gmock.cc')
-rw-r--r--googlemock/src/gmock.cc12
1 files changed, 6 insertions, 6 deletions
diff --git a/googlemock/src/gmock.cc b/googlemock/src/gmock.cc
index 36356c93..675e8db8 100644
--- a/googlemock/src/gmock.cc
+++ b/googlemock/src/gmock.cc
@@ -65,12 +65,12 @@ static const char* ParseGoogleMockFlagValue(const char* str,
const char* flag,
bool def_optional) {
// str and flag must not be NULL.
- if (str == NULL || flag == NULL) return NULL;
+ if (str == nullptr || flag == nullptr) return nullptr;
// The flag must start with "--gmock_".
const std::string flag_str = std::string("--gmock_") + flag;
const size_t flag_len = flag_str.length();
- if (strncmp(str, flag_str.c_str(), flag_len) != 0) return NULL;
+ if (strncmp(str, flag_str.c_str(), flag_len) != 0) return nullptr;
// Skips the flag name.
const char* flag_end = str + flag_len;
@@ -83,7 +83,7 @@ static const char* ParseGoogleMockFlagValue(const char* str,
// If def_optional is true and there are more characters after the
// flag name, or if def_optional is false, there must be a '=' after
// the flag name.
- if (flag_end[0] != '=') return NULL;
+ if (flag_end[0] != '=') return nullptr;
// Returns the string after "=".
return flag_end + 1;
@@ -100,7 +100,7 @@ static bool ParseGoogleMockBoolFlag(const char* str, const char* flag,
const char* const value_str = ParseGoogleMockFlagValue(str, flag, true);
// Aborts if the parsing failed.
- if (value_str == NULL) return false;
+ if (value_str == nullptr) return false;
// Converts the string value to a bool.
*value = !(*value_str == '0' || *value_str == 'f' || *value_str == 'F');
@@ -119,7 +119,7 @@ static bool ParseGoogleMockStringFlag(const char* str, const char* flag,
const char* const value_str = ParseGoogleMockFlagValue(str, flag, false);
// Aborts if the parsing failed.
- if (value_str == NULL) return false;
+ if (value_str == nullptr) return false;
// Sets *value to the value of the flag.
*value = value_str;
@@ -132,7 +132,7 @@ static bool ParseGoogleMockIntFlag(const char* str, const char* flag,
const char* const value_str = ParseGoogleMockFlagValue(str, flag, true);
// Aborts if the parsing failed.
- if (value_str == NULL) return false;
+ if (value_str == nullptr) return false;
// Sets *value to the value of the flag.
return ParseInt32(Message() << "The value of flag --" << flag,