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

Unified Diff: tools/gn/value.cc

Issue 1350043004: Cleanup: Initialize Value from tools/gn by moving std::string (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove Value(..., std::string&&) Created 5 years, 3 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
« tools/gn/value.h ('K') | « tools/gn/value.h ('k') | no next file » | 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 32a96ff7fc0672b7cca8992f8c8e6ff296c819ab..fc4dbd96c7b822f94aaf0dd5b029b44689df13c9 100644
--- a/tools/gn/value.cc
+++ b/tools/gn/value.cc
@@ -36,13 +36,12 @@ Value::Value(const ParseNode* origin, int64_t int_val)
origin_(origin) {
}
-Value::Value(const ParseNode* origin, std::string str_val)
+Value::Value(const ParseNode* origin, const std::string& str_val)
: type_(STRING),
- string_value_(),
+ string_value_(str_val),
boolean_value_(false),
int_value_(0),
origin_(origin) {
- string_value_.swap(str_val);
}
Value::Value(const ParseNode* origin, const char* str_val)
« tools/gn/value.h ('K') | « tools/gn/value.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698