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

Unified Diff: mojo/public/cpp/bindings/interface_request.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
Index: mojo/public/cpp/bindings/interface_request.h
diff --git a/mojo/public/cpp/bindings/interface_request.h b/mojo/public/cpp/bindings/interface_request.h
index 0a6dc2c151682f3382a84259ffd69a2ded01a045..17233308beed01fb5fcad6242926b490900ceabe 100644
--- a/mojo/public/cpp/bindings/interface_request.h
+++ b/mojo/public/cpp/bindings/interface_request.h
@@ -12,13 +12,13 @@ namespace mojo {
// Used in methods that return instances of remote objects.
template <typename Interface>
class InterfaceRequest {
- MOJO_MOVE_ONLY_TYPE_FOR_CPP_03(InterfaceRequest, RValue)
+ MOJO_MOVE_ONLY_TYPE(InterfaceRequest)
public:
InterfaceRequest() {}
- InterfaceRequest(RValue other) { handle_ = other.object->handle_.Pass(); }
- InterfaceRequest& operator=(RValue other) {
- handle_ = other.object->handle_.Pass();
+ InterfaceRequest(InterfaceRequest&& other) { handle_ = other.handle_.Pass(); }
+ InterfaceRequest& operator=(InterfaceRequest&& other) {
+ handle_ = other.handle_.Pass();
return *this;
}

Powered by Google App Engine
This is Rietveld 408576698