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

Unified Diff: tools/gn/scope.h

Issue 1885513003: GN: Use std::unique_ptr for owning pointers in Scope::NamedScopeMap. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | tools/gn/scope.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/gn/scope.h
diff --git a/tools/gn/scope.h b/tools/gn/scope.h
index 72aa0c3e2fb4d04b3124029083e6a337560649f4..e9bd1397cc9b81c76454e44e7c2e6f4eceb3cd78 100644
--- a/tools/gn/scope.h
+++ b/tools/gn/scope.h
@@ -333,10 +333,9 @@ class Scope {
RecordMap;
RecordMap values_;
- // Owning pointers. Note that this can't use string pieces since the names
- // are constructed from Values which might be deallocated before this goes
- // out of scope.
- typedef base::hash_map<std::string, Scope*> NamedScopeMap;
+ // Note that this can't use string pieces since the names are constructed from
+ // Values which might be deallocated before this goes out of scope.
+ typedef base::hash_map<std::string, std::unique_ptr<Scope>> NamedScopeMap;
NamedScopeMap target_defaults_;
// Null indicates not set and that we should fallback to the containing
« no previous file with comments | « no previous file | tools/gn/scope.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698