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

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

Issue 1535943002: Convert Pass()→std::move() in //mojo/public/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Regenerate correctly 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/associated_interface_ptr_info.h
diff --git a/mojo/public/cpp/bindings/associated_interface_ptr_info.h b/mojo/public/cpp/bindings/associated_interface_ptr_info.h
index 6bf546dbd5218351f182bdf00bd5401e4afabb6d..8340eeade626a0406529b71412b6178649afba58 100644
--- a/mojo/public/cpp/bindings/associated_interface_ptr_info.h
+++ b/mojo/public/cpp/bindings/associated_interface_ptr_info.h
@@ -6,6 +6,7 @@
#define MOJO_PUBLIC_CPP_BINDINGS_ASSOCIATED_INTERFACE_PTR_INFO_H_
#include <stdint.h>
+#include <utility>
#include "base/macros.h"
#include "mojo/public/cpp/bindings/lib/scoped_interface_endpoint_handle.h"
@@ -27,7 +28,7 @@ class AssociatedInterfacePtrInfo {
AssociatedInterfacePtrInfo() : version_(0u) {}
AssociatedInterfacePtrInfo(AssociatedInterfacePtrInfo&& other)
- : handle_(other.handle_.Pass()), version_(other.version_) {
+ : handle_(std::move(other.handle_)), version_(other.version_) {
other.version_ = 0u;
}
@@ -35,7 +36,7 @@ class AssociatedInterfacePtrInfo {
AssociatedInterfacePtrInfo& operator=(AssociatedInterfacePtrInfo&& other) {
if (this != &other) {
- handle_ = other.handle_.Pass();
+ handle_ = std::move(other.handle_);
version_ = other.version_;
other.version_ = 0u;
}
@@ -65,7 +66,7 @@ class AssociatedInterfacePtrInfoHelper {
template <typename Interface>
static ScopedInterfaceEndpointHandle PassHandle(
AssociatedInterfacePtrInfo<Interface>* info) {
- return info->handle_.Pass();
+ return std::move(info->handle_);
}
template <typename Interface>
@@ -77,7 +78,7 @@ class AssociatedInterfacePtrInfoHelper {
template <typename Interface>
static void SetHandle(AssociatedInterfacePtrInfo<Interface>* info,
ScopedInterfaceEndpointHandle handle) {
- info->handle_ = handle.Pass();
+ info->handle_ = std::move(handle);
}
};
« no previous file with comments | « mojo/public/cpp/bindings/associated_interface_ptr.h ('k') | mojo/public/cpp/bindings/associated_interface_request.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698