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

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

Issue 1549203002: Switch to standard integer types in tools/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 12 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/c_include_iterator.h ('k') | tools/gn/c_include_iterator_unittest.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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/c_include_iterator.h" 5 #include "tools/gn/c_include_iterator.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/macros.h"
8 #include "base/strings/string_util.h" 9 #include "base/strings/string_util.h"
9 #include "tools/gn/input_file.h" 10 #include "tools/gn/input_file.h"
10 #include "tools/gn/location.h" 11 #include "tools/gn/location.h"
11 12
12 namespace { 13 namespace {
13 14
14 enum IncludeType { 15 enum IncludeType {
15 INCLUDE_NONE, 16 INCLUDE_NONE,
16 INCLUDE_SYSTEM, // #include <...> 17 INCLUDE_SYSTEM, // #include <...>
17 INCLUDE_USER // #include "..." 18 INCLUDE_USER // #include "..."
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
166 line_number_++; 167 line_number_++;
167 168
168 *line = file_.substr(begin, offset_ - begin); 169 *line = file_.substr(begin, offset_ - begin);
169 *line_number = line_number_; 170 *line_number = line_number_;
170 171
171 // If we didn't hit EOF, skip past the newline for the next one. 172 // If we didn't hit EOF, skip past the newline for the next one.
172 if (offset_ < file_.size()) 173 if (offset_ < file_.size())
173 offset_++; 174 offset_++;
174 return true; 175 return true;
175 } 176 }
OLDNEW
« no previous file with comments | « tools/gn/c_include_iterator.h ('k') | tools/gn/c_include_iterator_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698