| Index: webrtc/base/bind.h.pump
|
| diff --git a/webrtc/base/bind.h.pump b/webrtc/base/bind.h.pump
|
| index e1cea61fc2afe85c432daf3f1639c06bbacecebe..6fb849095d4ac983f401a7f100e56bb33f9424dc 100644
|
| --- a/webrtc/base/bind.h.pump
|
| +++ b/webrtc/base/bind.h.pump
|
| @@ -61,6 +61,7 @@
|
| #define WEBRTC_BASE_BIND_H_
|
|
|
| #include "webrtc/base/scoped_ref_ptr.h"
|
| +#include "webrtc/base/template_util.h"
|
|
|
| #define NONAME
|
|
|
| @@ -124,21 +125,9 @@ struct PointerType {
|
| T*>::type type;
|
| };
|
|
|
| -// RemoveScopedPtrRef will capture scoped_refptr by-value instead of
|
| -// by-reference.
|
| -template <class T> struct RemoveScopedPtrRef { typedef T type; };
|
| -template <class T>
|
| -struct RemoveScopedPtrRef<const scoped_refptr<T>&> {
|
| - typedef scoped_refptr<T> type;
|
| -};
|
| -template <class T>
|
| -struct RemoveScopedPtrRef<scoped_refptr<T>&> {
|
| - typedef scoped_refptr<T> type;
|
| -};
|
| -
|
| } // namespace detail
|
|
|
| -$var n = 6
|
| +$var n = 9
|
| $range i 0..n
|
| $for i [[
|
| $range j 1..i
|
| @@ -157,7 +146,7 @@ class MethodFunctor$i {
|
| MethodT method_;
|
| typename detail::PointerType<ObjectT>::type object_;$for j [[
|
|
|
| - typename detail::RemoveScopedPtrRef<P$j>::type p$(j)_;]]
|
| + typename rtc::remove_reference<P$j>::type p$(j)_;]]
|
|
|
| };
|
|
|
| @@ -174,7 +163,7 @@ Functor$i(const FunctorT& functor$for j [[, P$j p$j]])
|
| private:
|
| FunctorT functor_;$for j [[
|
|
|
| - typename detail::RemoveScopedPtrRef<P$j>::type p$(j)_;]]
|
| + typename rtc::remove_reference<P$j>::type p$(j)_;]]
|
|
|
| };
|
|
|
|
|