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

Unified Diff: tools/gn/value.cc

Issue 1544333002: Convert Pass()→std::move() in //tools (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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/json_schema_compiler/test/simple_api_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/gn/value.cc
diff --git a/tools/gn/value.cc b/tools/gn/value.cc
index 6e8bcfad5239d247cb39d226334b915aff7bf7fc..57f23b070d53242740dfb70c24ab626d7a9edbc7 100644
--- a/tools/gn/value.cc
+++ b/tools/gn/value.cc
@@ -5,6 +5,7 @@
#include "tools/gn/value.h"
#include <stddef.h>
+#include <utility>
#include "base/strings/string_number_conversions.h"
#include "base/strings/string_util.h"
@@ -60,9 +61,8 @@ Value::Value(const ParseNode* origin, scoped_ptr<Scope> scope)
string_value_(),
boolean_value_(false),
int_value_(0),
- scope_value_(scope.Pass()),
- origin_(origin) {
-}
+ scope_value_(std::move(scope)),
+ origin_(origin) {}
Value::Value(const Value& other)
: type_(other.type_),
@@ -113,7 +113,7 @@ const char* Value::DescribeType(Type t) {
void Value::SetScopeValue(scoped_ptr<Scope> scope) {
DCHECK(type_ == SCOPE);
- scope_value_ = scope.Pass();
+ scope_value_ = std::move(scope);
}
std::string Value::ToString(bool quote_string) const {
« no previous file with comments | « tools/gn/toolchain.cc ('k') | tools/json_schema_compiler/test/simple_api_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698