Index: webrtc/base/buffer.h |
diff --git a/webrtc/base/buffer.h b/webrtc/base/buffer.h |
index 545ddb2be7cc91df5b2b695948d1610abe9fe331..ecf73adda0ee87f4eb7228c0efd9e35f66dcd8f1 100644 |
--- a/webrtc/base/buffer.h |
+++ b/webrtc/base/buffer.h |
@@ -192,7 +192,10 @@ class BufferT { |
SetData(array, N); |
} |
- void SetData(const BufferT& buf) { SetData(buf.data(), buf.size()); } |
+ template <typename W> |
ossu
2016/08/31 09:31:03
"W" as in Whatever? :)
kwiberg-webrtc
2016/09/01 09:23:53
Yeah, whatever.
|
+ void SetData(const W& w) { |
+ SetData(w.data(), w.size()); |
+ } |
// Replace the data in the buffer with at most |max_elements| of data, using |
// the function |setter|, which should have the following signature: |
@@ -234,7 +237,12 @@ class BufferT { |
AppendData(array, N); |
} |
- void AppendData(const BufferT& buf) { AppendData(buf.data(), buf.size()); } |
+ template <typename W, |
+ typename std::enable_if< |
+ !internal::BufferCompat<T, W>::value>::type* = nullptr> |
+ void AppendData(const W& w) { |
+ AppendData(w.data(), w.size()); |
+ } |
template <typename U, |
typename std::enable_if< |