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

Unified Diff: webrtc/base/messagehandler.h

Issue 1460043002: Don't call the Pass methods of rtc::Buffer, rtc::scoped_ptr, and rtc::ScopedVector (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Restore the Pass methods 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 | « webrtc/base/buffer.cc ('k') | webrtc/base/rtccertificate_unittests.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/base/messagehandler.h
diff --git a/webrtc/base/messagehandler.h b/webrtc/base/messagehandler.h
index df82b4ea9afa311caa3872475ac5f819c8388870..b55b229a6db4792dca32ca95c0adaff508c7110d 100644
--- a/webrtc/base/messagehandler.h
+++ b/webrtc/base/messagehandler.h
@@ -11,6 +11,8 @@
#ifndef WEBRTC_BASE_MESSAGEHANDLER_H_
#define WEBRTC_BASE_MESSAGEHANDLER_H_
+#include <utility>
+
#include "webrtc/base/constructormagic.h"
#include "webrtc/base/scoped_ptr.h"
@@ -54,8 +56,8 @@ class FunctorMessageHandler<class rtc::scoped_ptr<ReturnT>, FunctorT>
: public MessageHandler {
public:
explicit FunctorMessageHandler(const FunctorT& functor) : functor_(functor) {}
- virtual void OnMessage(Message* msg) { result_ = functor_().Pass(); }
- rtc::scoped_ptr<ReturnT> result() { return result_.Pass(); }
+ virtual void OnMessage(Message* msg) { result_ = std::move(functor_()); }
+ rtc::scoped_ptr<ReturnT> result() { return std::move(result_); }
private:
FunctorT functor_;
« no previous file with comments | « webrtc/base/buffer.cc ('k') | webrtc/base/rtccertificate_unittests.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698