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

Unified Diff: mojo/public/cpp/bindings/tests/container_test_util.cc

Issue 828373008: Allow constructing {Interface,Struct}Ptr from nullptr (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 11 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
Index: mojo/public/cpp/bindings/tests/container_test_util.cc
diff --git a/mojo/public/cpp/bindings/tests/container_test_util.cc b/mojo/public/cpp/bindings/tests/container_test_util.cc
index 12fdabacb85bbae72febb83f97db72a7585b83e3..e8377c4ce510be97f1c7700980ba6b2f52f1b603 100644
--- a/mojo/public/cpp/bindings/tests/container_test_util.cc
+++ b/mojo/public/cpp/bindings/tests/container_test_util.cc
@@ -32,14 +32,14 @@ MoveOnlyType::MoveOnlyType() : moved_(false), ptr_(this) {
num_instances_++;
}
-MoveOnlyType::MoveOnlyType(RValue other)
- : moved_(true), ptr_(other.object->ptr()) {
+MoveOnlyType::MoveOnlyType(MoveOnlyType&& other)
+ : moved_(true), ptr_(other.ptr()) {
num_instances_++;
}
-MoveOnlyType& MoveOnlyType::operator=(RValue other) {
+MoveOnlyType& MoveOnlyType::operator=(MoveOnlyType&& other) {
moved_ = true;
- ptr_ = other.object->ptr();
+ ptr_ = other.ptr();
return *this;
}

Powered by Google App Engine
This is Rietveld 408576698