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

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

Issue 1544333002: Convert Pass()→std::move() 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/builder.cc ('k') | tools/gn/function_toolchain.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 #ifndef TOOLS_GN_BUILDER_RECORD_H_ 5 #ifndef TOOLS_GN_BUILDER_RECORD_H_
6 #define TOOLS_GN_BUILDER_RECORD_H_ 6 #define TOOLS_GN_BUILDER_RECORD_H_
7 7
8 #include <set> 8 #include <set>
9 #include <utility>
9 10
10 #include "base/macros.h" 11 #include "base/macros.h"
11 #include "base/memory/scoped_ptr.h" 12 #include "base/memory/scoped_ptr.h"
12 #include "tools/gn/item.h" 13 #include "tools/gn/item.h"
13 #include "tools/gn/location.h" 14 #include "tools/gn/location.h"
14 15
15 class ParseNode; 16 class ParseNode;
16 17
17 // This class is used by the builder to manage the loading of the dependency 18 // This class is used by the builder to manage the loading of the dependency
18 // tree. It holds a reference to an item and links to other records that the 19 // tree. It holds a reference to an item and links to other records that the
(...skipping 28 matching lines...) Expand all
47 static const char* GetNameForType(ItemType type); 48 static const char* GetNameForType(ItemType type);
48 49
49 // Returns true if the given item is of the given type. 50 // Returns true if the given item is of the given type.
50 static bool IsItemOfType(const Item* item, ItemType type); 51 static bool IsItemOfType(const Item* item, ItemType type);
51 52
52 // Returns the type enum for the given item. 53 // Returns the type enum for the given item.
53 static ItemType TypeOfItem(const Item* item); 54 static ItemType TypeOfItem(const Item* item);
54 55
55 Item* item() { return item_.get(); } 56 Item* item() { return item_.get(); }
56 const Item* item() const { return item_.get(); } 57 const Item* item() const { return item_.get(); }
57 void set_item(scoped_ptr<Item> item) { item_ = item.Pass(); } 58 void set_item(scoped_ptr<Item> item) { item_ = std::move(item); }
58 59
59 // Indicates from where this item was originally referenced from that caused 60 // Indicates from where this item was originally referenced from that caused
60 // it to be loaded. For targets for which we encountered the declaration 61 // it to be loaded. For targets for which we encountered the declaration
61 // before a reference, this will be the empty range. 62 // before a reference, this will be the empty range.
62 const ParseNode* originally_referenced_from() const { 63 const ParseNode* originally_referenced_from() const {
63 return originally_referenced_from_; 64 return originally_referenced_from_;
64 } 65 }
65 void set_originally_referenced_from(const ParseNode* pn) { 66 void set_originally_referenced_from(const ParseNode* pn) {
66 originally_referenced_from_ = pn; 67 originally_referenced_from_ = pn;
67 } 68 }
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 bool resolved_; 103 bool resolved_;
103 104
104 BuilderRecordSet all_deps_; 105 BuilderRecordSet all_deps_;
105 BuilderRecordSet unresolved_deps_; 106 BuilderRecordSet unresolved_deps_;
106 BuilderRecordSet waiting_on_resolution_; 107 BuilderRecordSet waiting_on_resolution_;
107 108
108 DISALLOW_COPY_AND_ASSIGN(BuilderRecord); 109 DISALLOW_COPY_AND_ASSIGN(BuilderRecord);
109 }; 110 };
110 111
111 #endif // TOOLS_GN_BUILDER_RECORD_H_ 112 #endif // TOOLS_GN_BUILDER_RECORD_H_
OLDNEW
« no previous file with comments | « tools/gn/builder.cc ('k') | tools/gn/function_toolchain.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698