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

Unified Diff: mojo/public/cpp/bindings/array.h

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
« no previous file with comments | « no previous file | mojo/public/cpp/bindings/interface_ptr.h » ('j') | mojo/public/cpp/bindings/struct_ptr.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/public/cpp/bindings/array.h
diff --git a/mojo/public/cpp/bindings/array.h b/mojo/public/cpp/bindings/array.h
index 2544abb04dadf76c001a0d186c8d6d7e79de5af9..ca4e9cc18df2241ea8e347558b4e0b4601d1359e 100644
--- a/mojo/public/cpp/bindings/array.h
+++ b/mojo/public/cpp/bindings/array.h
@@ -20,7 +20,7 @@ namespace mojo {
template <typename T>
class Array {
- MOJO_MOVE_ONLY_TYPE_FOR_CPP_03(Array, RValue)
+ MOJO_MOVE_ONLY_TYPE(Array)
public:
typedef internal::ArrayTraits<T, internal::IsMoveOnlyType<T>::value> Traits;
typedef typename Traits::ConstRefType ConstRefType;
@@ -37,9 +37,9 @@ class Array {
}
~Array() { Traits::Finalize(&vec_); }
- Array(RValue other) : is_null_(true) { Take(other.object); }
- Array& operator=(RValue other) {
- Take(other.object);
+ Array(Array&& other) : is_null_(true) { Take(&other); }
+ Array& operator=(Array&& other) {
+ Take(&other);
return *this;
}
« no previous file with comments | « no previous file | mojo/public/cpp/bindings/interface_ptr.h » ('j') | mojo/public/cpp/bindings/struct_ptr.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698