Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
yangql
googletest
Commits
88760a29
Unverified
Commit
88760a29
authored
Jan 03, 2018
by
Gennadiy Civil
Committed by
GitHub
Jan 03, 2018
Browse files
Merge pull request #991 from davidben/uintptr
Pass MSVC's C4826 warning.
parents
1414d71a
fa673010
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
7 deletions
+2
-7
googletest/include/gtest/gtest-printers.h
googletest/include/gtest/gtest-printers.h
+2
-7
No files found.
googletest/include/gtest/gtest-printers.h
View file @
88760a29
...
@@ -427,13 +427,8 @@ void DefaultPrintTo(WrapPrinterType<kPrintFunctionPointer> /* dummy */,
...
@@ -427,13 +427,8 @@ void DefaultPrintTo(WrapPrinterType<kPrintFunctionPointer> /* dummy */,
*
os
<<
"NULL"
;
*
os
<<
"NULL"
;
}
else
{
}
else
{
// T is a function type, so '*os << p' doesn't do what we want
// T is a function type, so '*os << p' doesn't do what we want
// (it just prints p as bool). We want to print p as a const
// (it just prints p as bool). Cast p to const void* to print it.
// void*. However, we cannot cast it to const void* directly,
*
os
<<
reinterpret_cast
<
const
void
*>
(
p
);
// even using reinterpret_cast, as earlier versions of gcc
// (e.g. 3.4.5) cannot compile the cast when p is a function
// pointer. Casting to UInt64 first solves the problem.
*
os
<<
reinterpret_cast
<
const
void
*>
(
reinterpret_cast
<
internal
::
UInt64
>
(
p
));
}
}
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment