Commit 3357f674 authored by Anand K Mistry's avatar Anand K Mistry Committed by Commit Bot

[Mojo] Replace move implementations of MessageView with the default

The provided implementations are the same as the default, so just use
default.

Bug: None
Change-Id: Ie4c772a6371805cd869673b9979983cfa7714f29
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2249284Reviewed-by: default avatarKen Rockot <rockot@google.com>
Commit-Queue: Anand K Mistry <amistry@chromium.org>
Cr-Commit-Position: refs/heads/master@{#779563}
parent a57c833a
...@@ -99,14 +99,9 @@ class MessageView { ...@@ -99,14 +99,9 @@ class MessageView {
DCHECK_GT(message_->data_num_bytes(), offset_); DCHECK_GT(message_->data_num_bytes(), offset_);
} }
MessageView(MessageView&& other) { *this = std::move(other); } MessageView(MessageView&& other) = default;
MessageView& operator=(MessageView&& other) { MessageView& operator=(MessageView&& other) = default;
message_ = std::move(other.message_);
offset_ = other.offset_;
handles_ = std::move(other.handles_);
return *this;
}
~MessageView() = default; ~MessageView() = default;
......
...@@ -47,7 +47,7 @@ class MessageView { ...@@ -47,7 +47,7 @@ class MessageView {
DCHECK(!message_->data_num_bytes() || message_->data_num_bytes() > offset_); DCHECK(!message_->data_num_bytes() || message_->data_num_bytes() > offset_);
} }
MessageView(MessageView&& other) { *this = std::move(other); } MessageView(MessageView&& other) = default;
MessageView& operator=(MessageView&& other) = default; MessageView& operator=(MessageView&& other) = default;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment