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

Unified Diff: mojo/public/cpp/bindings/lib/filter_chain.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/lib/filter_chain.cc
diff --git a/mojo/public/cpp/bindings/lib/filter_chain.cc b/mojo/public/cpp/bindings/lib/filter_chain.cc
index 663456218498082e6f85047ce6f9b4904574c11d..d32eb7860896e3d670c3075310d57f4276092a89 100644
--- a/mojo/public/cpp/bindings/lib/filter_chain.cc
+++ b/mojo/public/cpp/bindings/lib/filter_chain.cc
@@ -14,14 +14,14 @@ namespace internal {
FilterChain::FilterChain(MessageReceiver* sink) : sink_(sink) {
}
-FilterChain::FilterChain(RValue other) : sink_(other.object->sink_) {
- other.object->sink_ = nullptr;
- filters_.swap(other.object->filters_);
+FilterChain::FilterChain(FilterChain&& other) : sink_(other.sink_) {
+ other.sink_ = nullptr;
+ filters_.swap(other.filters_);
}
-FilterChain& FilterChain::operator=(RValue other) {
- std::swap(sink_, other.object->sink_);
- filters_.swap(other.object->filters_);
+FilterChain& FilterChain::operator=(FilterChain&& other) {
+ std::swap(sink_, other.sink_);
+ filters_.swap(other.filters_);
return *this;
}

Powered by Google App Engine
This is Rietveld 408576698