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
a868e618
Unverified
Commit
a868e618
authored
Dec 05, 2017
by
Gennadiy Civil
Committed by
GitHub
Dec 05, 2017
Browse files
Merge pull request #1225 from brian-peloton/master
Speed up printing of characters which need hex escaping
parents
247a3d8e
9e236748
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
1 deletion
+4
-1
googletest/src/gtest-printers.cc
googletest/src/gtest-printers.cc
+4
-1
No files found.
googletest/src/gtest-printers.cc
View file @
a868e618
...
...
@@ -180,7 +180,10 @@ static CharFormat PrintAsCharLiteralTo(Char c, ostream* os) {
*
os
<<
static_cast
<
char
>
(
c
);
return
kAsIs
;
}
else
{
*
os
<<
"
\\
x"
+
String
::
FormatHexInt
(
static_cast
<
UnsignedChar
>
(
c
));
ostream
::
fmtflags
flags
=
os
->
flags
();
*
os
<<
"
\\
x"
<<
std
::
hex
<<
std
::
uppercase
<<
static_cast
<
int
>
(
static_cast
<
UnsignedChar
>
(
c
));
os
->
flags
(
flags
);
return
kHexEscape
;
}
}
...
...
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