Index: webrtc/base/buffer.h |
diff --git a/webrtc/base/buffer.h b/webrtc/base/buffer.h |
index b8b8fc0e1693f92e87969f57eb5ec7c84cd86f15..2bb241d9e5135be03b75b8f9ba0ed9b36ea646a1 100644 |
--- a/webrtc/base/buffer.h |
+++ b/webrtc/base/buffer.h |
@@ -235,6 +235,13 @@ class BufferT { |
void AppendData(const BufferT& buf) { AppendData(buf.data(), buf.size()); } |
+ template <typename U, |
+ typename std::enable_if< |
+ internal::BufferCompat<T, U>::value>::type* = nullptr> |
+ void AppendData(const U& item) { |
+ AppendData(&item, 1); |
+ } |
+ |
// Append at most |max_elements| to the end of the buffer, using the function |
// |setter|, which should have the following signature: |
// size_t setter(ArrayView<U> view) |