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

Unified Diff: mojo/public/cpp/bindings/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
« no previous file with comments | « mojo/public/cpp/bindings/interface_ptr.h ('k') | mojo/public/cpp/bindings/interface_request.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/public/cpp/bindings/interface_ptr_info.h
diff --git a/mojo/public/cpp/bindings/interface_ptr_info.h b/mojo/public/cpp/bindings/interface_ptr_info.h
index ce049cf8c18b36ab84de8c598c420cce0b7d95d9..5bd29d542d5c3d602c5f43f1ed566ca3801336e7 100644
--- a/mojo/public/cpp/bindings/interface_ptr_info.h
+++ b/mojo/public/cpp/bindings/interface_ptr_info.h
@@ -6,6 +6,7 @@
#define MOJO_PUBLIC_CPP_BINDINGS_INTERFACE_PTR_INFO_H_
#include <stdint.h>
+#include <utility>
#include "mojo/public/cpp/system/macros.h"
#include "mojo/public/cpp/system/message_pipe.h"
@@ -22,10 +23,10 @@ class InterfacePtrInfo {
InterfacePtrInfo() : version_(0u) {}
InterfacePtrInfo(ScopedMessagePipeHandle handle, uint32_t version)
- : handle_(handle.Pass()), version_(version) {}
+ : handle_(std::move(handle)), version_(version) {}
InterfacePtrInfo(InterfacePtrInfo&& other)
- : handle_(other.handle_.Pass()), version_(other.version_) {
+ : handle_(std::move(other.handle_)), version_(other.version_) {
other.version_ = 0u;
}
@@ -43,9 +44,11 @@ class InterfacePtrInfo {
bool is_valid() const { return handle_.is_valid(); }
- ScopedMessagePipeHandle PassHandle() { return handle_.Pass(); }
+ ScopedMessagePipeHandle PassHandle() { return std::move(handle_); }
const ScopedMessagePipeHandle& handle() const { return handle_; }
- void set_handle(ScopedMessagePipeHandle handle) { handle_ = handle.Pass(); }
+ void set_handle(ScopedMessagePipeHandle handle) {
+ handle_ = std::move(handle);
+ }
uint32_t version() const { return version_; }
void set_version(uint32_t version) { version_ = version; }
« no previous file with comments | « mojo/public/cpp/bindings/interface_ptr.h ('k') | mojo/public/cpp/bindings/interface_request.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698