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

Side by Side Diff: tools/gn/ordered_set.h

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, 11 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_unittest.cc ('k') | tools/gn/output_file.h » ('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 #ifndef TOOLS_GN_ORDERED_SET_H_ 5 #ifndef TOOLS_GN_ORDERED_SET_H_
6 #define TOOLS_GN_ORDERED_SET_H_ 6 #define TOOLS_GN_ORDERED_SET_H_
7 7
8 #include <stddef.h>
9
8 #include <set> 10 #include <set>
9 11
10 // An ordered set of items. Only appending is supported. Iteration is designed 12 // An ordered set of items. Only appending is supported. Iteration is designed
11 // to be by index. 13 // to be by index.
12 template<typename T> 14 template<typename T>
13 class OrderedSet { 15 class OrderedSet {
14 private: 16 private:
15 typedef std::set<T> set_type; 17 typedef std::set<T> set_type;
16 typedef typename set_type::const_iterator set_iterator; 18 typedef typename set_type::const_iterator set_iterator;
17 typedef std::vector<set_iterator> vector_type; 19 typedef std::vector<set_iterator> vector_type;
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 for (size_t i = 0; i < other.size(); i++) 62 for (size_t i = 0; i < other.size(); i++)
61 push_back(other[i]); 63 push_back(other[i]);
62 } 64 }
63 65
64 private: 66 private:
65 set_type set_; 67 set_type set_;
66 vector_type ordering_; 68 vector_type ordering_;
67 }; 69 };
68 70
69 #endif // TOOLS_GN_ORDERED_SET_H_ 71 #endif // TOOLS_GN_ORDERED_SET_H_
OLDNEW
« no previous file with comments | « tools/gn/operators_unittest.cc ('k') | tools/gn/output_file.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698