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 1869503004: Convert //tools to use std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase, change iwyu fixes for converted directories to include <memory> 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 | « tools/gn/parser_unittest.cc ('k') | 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 96b3939a15de5d0e55604ac2880654c4b0495373..72aa0c3e2fb4d04b3124029083e6a337560649f4 100644
--- a/tools/gn/scope.h
+++ b/tools/gn/scope.h
@@ -6,13 +6,13 @@
#define TOOLS_GN_SCOPE_H_
#include <map>
+#include <memory>
#include <set>
#include <utility>
#include "base/containers/hash_tables.h"
#include "base/macros.h"
#include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
#include "base/memory/scoped_vector.h"
#include "tools/gn/err.h"
#include "tools/gn/pattern.h"
@@ -227,7 +227,7 @@ class Scope {
// be included. The resulting closure will reference the const containing
// scope as its containing scope (since we assume the const scope won't
// change, we don't have to copy its values).
- scoped_ptr<Scope> MakeClosure() const;
+ std::unique_ptr<Scope> MakeClosure() const;
// Makes an empty scope with the given name. Returns NULL if the name is
// already set.
@@ -239,8 +239,7 @@ class Scope {
// Filter to apply when the sources variable is assigned. May return NULL.
const PatternList* GetSourcesAssignmentFilter() const;
- void set_sources_assignment_filter(
- scoped_ptr<PatternList> f) {
+ void set_sources_assignment_filter(std::unique_ptr<PatternList> f) {
sources_assignment_filter_ = std::move(f);
}
@@ -342,7 +341,7 @@ class Scope {
// Null indicates not set and that we should fallback to the containing
// scope's filter.
- scoped_ptr<PatternList> sources_assignment_filter_;
+ std::unique_ptr<PatternList> sources_assignment_filter_;
// Owning pointers, must be deleted.
typedef std::map<std::string, scoped_refptr<const Template> > TemplateMap;
« no previous file with comments | « tools/gn/parser_unittest.cc ('k') | tools/gn/scope.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698