Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(58)

Side by Side Diff: tools/gn/standard_out.cc

Issue 25153002: Enable compiling GN by default. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set:  Created 7 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « tools/gn/operators.cc ('k') | tools/gn/string_utils.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "tools/gn/standard_out.h" 5 #include "tools/gn/standard_out.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/strings/string_split.h" 9 #include "base/strings/string_split.h"
10 #include "build/build_config.h" 10 #include "build/build_config.h"
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 FOREGROUND_BLUE | FOREGROUND_INTENSITY); 67 FOREGROUND_BLUE | FOREGROUND_INTENSITY);
68 break; 68 break;
69 case DECORATION_YELLOW: 69 case DECORATION_YELLOW:
70 ::SetConsoleTextAttribute(hstdout, 70 ::SetConsoleTextAttribute(hstdout,
71 FOREGROUND_RED | FOREGROUND_GREEN); 71 FOREGROUND_RED | FOREGROUND_GREEN);
72 break; 72 break;
73 } 73 }
74 } 74 }
75 75
76 DWORD written = 0; 76 DWORD written = 0;
77 ::WriteFile(hstdout, output.c_str(), output.size(), &written, NULL); 77 ::WriteFile(hstdout, output.c_str(), static_cast<DWORD>(output.size()),
78 &written, NULL);
78 79
79 if (is_console) 80 if (is_console)
80 ::SetConsoleTextAttribute(hstdout, default_attributes); 81 ::SetConsoleTextAttribute(hstdout, default_attributes);
81 } 82 }
82 83
83 #else 84 #else
84 85
85 void OutputString(const std::string& output, TextDecoration dec) { 86 void OutputString(const std::string& output, TextDecoration dec) {
86 EnsureInitialized(); 87 EnsureInitialized();
87 if (is_console) { 88 if (is_console) {
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
167 break; 168 break;
168 } else if (line[char_i] != ' ') { 169 } else if (line[char_i] != ' ') {
169 break; 170 break;
170 } 171 }
171 } 172 }
172 173
173 OutputString(line + "\n", dec); 174 OutputString(line + "\n", dec);
174 } 175 }
175 } 176 }
176 177
OLDNEW
« no previous file with comments | « tools/gn/operators.cc ('k') | tools/gn/string_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698