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

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

Issue 2468633003: Allow inherited constructors and add a sample usage. (Closed)
Patch Set: Resync Created 4 years, 1 month 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/pool.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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/pool.h" 5 #include "tools/gn/pool.h"
6 6
7 #include <sstream> 7 #include <sstream>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 10
11 Pool::Pool(const Settings* settings, const Label& label)
12 : Item(settings, label) {}
13
14 Pool::~Pool() {} 11 Pool::~Pool() {}
15 12
16 Pool* Pool::AsPool() { 13 Pool* Pool::AsPool() {
17 return this; 14 return this;
18 } 15 }
19 16
20 const Pool* Pool::AsPool() const { 17 const Pool* Pool::AsPool() const {
21 return this; 18 return this;
22 } 19 }
23 20
(...skipping 15 matching lines...) Expand all
39 } 36 }
40 37
41 DCHECK(label().dir().is_source_absolute()); 38 DCHECK(label().dir().is_source_absolute());
42 std::string label_dir = label().dir().value(); 39 std::string label_dir = label().dir().value();
43 for (std::string::size_type i = 2; i < label_dir.size(); ++i) { 40 for (std::string::size_type i = 2; i < label_dir.size(); ++i) {
44 buffer << (label_dir[i] == '/' ? '_' : label_dir[i]); 41 buffer << (label_dir[i] == '/' ? '_' : label_dir[i]);
45 } 42 }
46 buffer << label().name(); 43 buffer << label().name();
47 return buffer.str(); 44 return buffer.str();
48 } 45 }
OLDNEW
« no previous file with comments | « tools/gn/pool.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698