Commit edba5d80 authored by vladlosev's avatar vladlosev
Browse files

Fixes linker error when used with gMock on Windows

parent 6bfc4b2b
...@@ -4446,8 +4446,8 @@ bool ParseStringFlag(const char* str, const char* flag, String* value) { ...@@ -4446,8 +4446,8 @@ bool ParseStringFlag(const char* str, const char* flag, String* value) {
// Determines whether a string pointed by *str has the prefix parameter as // Determines whether a string pointed by *str has the prefix parameter as
// its prefix and advances it to point past the prefix if it does. // its prefix and advances it to point past the prefix if it does.
bool SkipPrefix(const char* prefix, const char** str) { static bool SkipPrefix(const char* prefix, const char** str) {
const int prefix_len = strlen(prefix); const size_t prefix_len = strlen(prefix);
if (strncmp(*str, prefix, prefix_len) != 0) if (strncmp(*str, prefix, prefix_len) != 0)
return false; return false;
...@@ -4462,7 +4462,7 @@ bool SkipPrefix(const char* prefix, const char** str) { ...@@ -4462,7 +4462,7 @@ bool SkipPrefix(const char* prefix, const char** str) {
// recognized, it will print its help message. Flags starting with // recognized, it will print its help message. Flags starting with
// GTEST_INTERNAL_PREFIX_ followed by "internal_" are considered Google Test // GTEST_INTERNAL_PREFIX_ followed by "internal_" are considered Google Test
// internal flags and do not trigger the help message. // internal flags and do not trigger the help message.
bool HasGoogleTestFlagPrefix(const char* str) { static bool HasGoogleTestFlagPrefix(const char* str) {
return (SkipPrefix("--", &str) || return (SkipPrefix("--", &str) ||
SkipPrefix("-", &str) || SkipPrefix("-", &str) ||
SkipPrefix("/", &str)) && SkipPrefix("/", &str)) &&
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment