Commit 3b9ea0e7 authored by Fredrik Söderquist's avatar Fredrik Söderquist Committed by Commit Bot

Use std::move() in a few places for blink::protocol::Binary

Change-Id: I14676858a9d5e43050139ba3dc17a0ee85bc8d02
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1698535Reviewed-by: default avatarJohannes Henkel <johannes@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#676976}
parent a3b6548b
......@@ -100,7 +100,7 @@ namespace {
class BinaryBasedOnSharedBuffer : public Binary::Impl {
public:
explicit BinaryBasedOnSharedBuffer(scoped_refptr<SharedBuffer> buffer)
: buffer_(buffer) {}
: buffer_(std::move(buffer)) {}
const uint8_t* data() const override {
return reinterpret_cast<const uint8_t*>(buffer_->Data());
......@@ -153,7 +153,8 @@ Binary Binary::fromBase64(const String& base64, bool* success) {
// static
Binary Binary::fromSharedBuffer(scoped_refptr<SharedBuffer> buffer) {
return Binary(base::AdoptRef(new BinaryBasedOnSharedBuffer(buffer)));
return Binary(
base::AdoptRef(new BinaryBasedOnSharedBuffer(std::move(buffer))));
}
// static
......
......@@ -134,7 +134,7 @@ class CORE_EXPORT Binary {
std::unique_ptr<v8::ScriptCompiler::CachedData> data);
private:
explicit Binary(scoped_refptr<Impl> impl) : impl_(impl) {}
explicit Binary(scoped_refptr<Impl> impl) : impl_(std::move(impl)) {}
scoped_refptr<Impl> impl_;
};
} // namespace protocol
......
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