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

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

Issue 1535943002: Convert Pass()→std::move() in //mojo/public/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove self-move checks to avoid triggering clang warning. Created 5 years 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_ptr.h
diff --git a/mojo/public/cpp/bindings/interface_ptr.h b/mojo/public/cpp/bindings/interface_ptr.h
index 51cfc352898e27edc102d4637a6fad34f007576d..831e229ac513814249f9cd21a7157dbe2b776afa 100644
--- a/mojo/public/cpp/bindings/interface_ptr.h
+++ b/mojo/public/cpp/bindings/interface_ptr.h
@@ -5,6 +5,8 @@
#ifndef MOJO_PUBLIC_CPP_BINDINGS_INTERFACE_PTR_H_
#define MOJO_PUBLIC_CPP_BINDINGS_INTERFACE_PTR_H_
+#include <utility>
+
#include "base/logging.h"
#include "base/macros.h"
#include "mojo/public/cpp/bindings/callback.h"
@@ -74,7 +76,7 @@ class InterfacePtr {
const MojoAsyncWaiter* waiter = Environment::GetDefaultAsyncWaiter()) {
reset();
if (info.is_valid())
- internal_state_.Bind(info.Pass(), waiter);
+ internal_state_.Bind(std::move(info), waiter);
}
// Returns whether or not this InterfacePtr is bound to a message pipe.
@@ -217,8 +219,8 @@ InterfacePtr<Interface> MakeProxy(
const MojoAsyncWaiter* waiter = Environment::GetDefaultAsyncWaiter()) {
InterfacePtr<Interface> ptr;
if (info.is_valid())
- ptr.Bind(info.Pass(), waiter);
- return ptr.Pass();
+ ptr.Bind(std::move(info), waiter);
+ return std::move(ptr);
}
} // namespace mojo

Powered by Google App Engine
This is Rietveld 408576698