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

Unified Diff: tools/gn/value.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/toolchain.cc ('k') | tools/gn/value.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/gn/value.h
diff --git a/tools/gn/value.h b/tools/gn/value.h
index 44fba4adb2af16a450eda4608a767ed178a2bb1e..a8a83fb7c8c4e1cd828f0c627b7f4205364ccb54 100644
--- a/tools/gn/value.h
+++ b/tools/gn/value.h
@@ -6,11 +6,12 @@
#define TOOLS_GN_VALUE_H_
#include <stdint.h>
+
#include <map>
+#include <memory>
#include "base/logging.h"
#include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
#include "tools/gn/err.h"
class ParseNode;
@@ -39,7 +40,7 @@ class Value {
// use-cases for creating values and immediately setting the scope on it. So
// you can pass a null scope here if you promise to set it before any other
// code gets it (code will generally assume the scope is not null).
- Value(const ParseNode* origin, scoped_ptr<Scope> scope);
+ Value(const ParseNode* origin, std::unique_ptr<Scope> scope);
Value(const Value& other);
~Value();
@@ -99,7 +100,7 @@ class Value {
DCHECK(type_ == SCOPE);
return scope_value_.get();
}
- void SetScopeValue(scoped_ptr<Scope> scope);
+ void SetScopeValue(std::unique_ptr<Scope> scope);
// Converts the given value to a string. Returns true if strings should be
// quoted or the ToString of a string should be the string itself. If the
@@ -124,7 +125,7 @@ class Value {
bool boolean_value_;
int64_t int_value_;
std::vector<Value> list_value_;
- scoped_ptr<Scope> scope_value_;
+ std::unique_ptr<Scope> scope_value_;
const ParseNode* origin_;
};
« no previous file with comments | « tools/gn/toolchain.cc ('k') | tools/gn/value.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698