diff options
author | danakj <danakj@chromium.org> | 2015-11-24 21:29:58 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-11-25 05:30:56 +0000 |
commit | 0c8d4aa8ba54f463cc22ce21bf1088edd3d1e207 (patch) | |
tree | 02600e7d74e72eaa08f2eb3d47697a8d35f34390 /base/json | |
parent | 7296f934bf1ab8c1b62e49c81f2eecb397389144 (diff) | |
download | chromium_src-0c8d4aa8ba54f463cc22ce21bf1088edd3d1e207.zip chromium_src-0c8d4aa8ba54f463cc22ce21bf1088edd3d1e207.tar.gz chromium_src-0c8d4aa8ba54f463cc22ce21bf1088edd3d1e207.tar.bz2 |
base: Use std::move() instead of Pass() for real movable types.
Some of our movable types have real move-constructors/assignment
operators now. We can use std::move() for these types instead of Pass().
There's still some move-only types that are implemented using an
"Rvalue" type emulation, so we have to keep Pass() for those still.
R=thestig@chromium.org
BUG=557422
Review URL: https://codereview.chromium.org/1479473002
Cr-Commit-Position: refs/heads/master@{#361583}
Diffstat (limited to 'base/json')
-rw-r--r-- | base/json/json_writer_unittest.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/base/json/json_writer_unittest.cc b/base/json/json_writer_unittest.cc index 0daeafc..a6f1a18 100644 --- a/base/json/json_writer_unittest.cc +++ b/base/json/json_writer_unittest.cc @@ -57,10 +57,10 @@ TEST(JSONWriterTest, NestedTypes) { scoped_ptr<ListValue> list(new ListValue()); scoped_ptr<DictionaryValue> inner_dict(new DictionaryValue()); inner_dict->SetInteger("inner int", 10); - list->Append(inner_dict.Pass()); + list->Append(std::move(inner_dict)); list->Append(make_scoped_ptr(new ListValue())); list->AppendBoolean(true); - root_dict.Set("list", list.Pass()); + root_dict.Set("list", std::move(list)); // Test the pretty-printer. EXPECT_TRUE(JSONWriter::Write(root_dict, &output_js)); @@ -92,7 +92,7 @@ TEST(JSONWriterTest, KeysWithPeriods) { period_dict.SetIntegerWithoutPathExpansion("c", 2); scoped_ptr<DictionaryValue> period_dict2(new DictionaryValue()); period_dict2->SetIntegerWithoutPathExpansion("g.h.i.j", 1); - period_dict.SetWithoutPathExpansion("d.e.f", period_dict2.Pass()); + period_dict.SetWithoutPathExpansion("d.e.f", std::move(period_dict2)); EXPECT_TRUE(JSONWriter::Write(period_dict, &output_js)); EXPECT_EQ("{\"a.b\":3,\"c\":2,\"d.e.f\":{\"g.h.i.j\":1}}", output_js); |