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
365df114
Commit
365df114
authored
Jun 21, 2017
by
Zulkarnine Mahmud
Committed by
GitHub
Jun 21, 2017
Browse files
Add background_mask instead of using magic number
parent
649aa295
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
1 deletion
+2
-1
googletest/src/gtest.cc
googletest/src/gtest.cc
+2
-1
No files found.
googletest/src/gtest.cc
View file @
365df114
...
@@ -2980,7 +2980,8 @@ void ColoredPrintf(GTestColor color, const char* fmt, ...) {
...
@@ -2980,7 +2980,8 @@ void ColoredPrintf(GTestColor color, const char* fmt, ...) {
GetConsoleScreenBufferInfo
(
stdout_handle
,
&
buffer_info
);
GetConsoleScreenBufferInfo
(
stdout_handle
,
&
buffer_info
);
const
WORD
old_color_attrs
=
buffer_info
.
wAttributes
;
const
WORD
old_color_attrs
=
buffer_info
.
wAttributes
;
// Let's reuse the BG
// Let's reuse the BG
const
WORD
existing_bg
=
old_color_attrs
&
0x00F0
;
const
WORD
background_mask
=
BACKGROUND_BLUE
|
BACKGROUND_GREEN
|
BACKGROUND_RED
|
BACKGROUND_INTENSITY
;
const
WORD
existing_bg
=
old_color_attrs
&
background_mask
;
// We need to flush the stream buffers into the console before each
// We need to flush the stream buffers into the console before each
// SetConsoleTextAttribute call lest it affect the text that is already
// SetConsoleTextAttribute call lest it affect the text that is already
...
...
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