9478437fde
1. Constructors, SetData(), and AppendData() now accept uint8_t*, int8_t*, and char*. Previously, they accepted void*, meaning that any kind of pointer was accepted. I think requiring an explicit cast in cases where the input array isn't already of a byte-sized type is a better compromise between convenience and safety. 2. data() can now return a uint8_t* instead of a char*, which seems more appropriate for a byte array, and is harder to mix up with zero-terminated C strings. data<int8_t>() is also available so that callers that want that type instead won't have to cast, as is data<char>() (which remains the default until all existing callers have been fixed). 3. Constructors, SetData(), and AppendData() now accept arrays natively, not just decayed to pointers. The advantage of this is that callers don't have to pass the size separately. 4. There are new constructors that allow setting size and capacity without initializing the array. Previously, this had to be done separately after construction. 5. Instead of TransferTo(), Buffer now supports swap(), and move construction and assignment, and has a Pass() method that works just like std::move(). (The Pass method is modeled after scoped_ptr::Pass().) R=jmarusic@webrtc.org, tommi@webrtc.org Review URL: https://webrtc-codereview.appspot.com/42989004 Cr-Commit-Position: refs/heads/master@{#9033} |
||
---|---|---|
.. | ||
audiomonitor.cc | ||
audiomonitor.h | ||
bundlefilter_unittest.cc | ||
bundlefilter.cc | ||
bundlefilter.h | ||
channel_unittest.cc | ||
channel.cc | ||
channel.h | ||
channelmanager_unittest.cc | ||
channelmanager.cc | ||
channelmanager.h | ||
currentspeakermonitor_unittest.cc | ||
currentspeakermonitor.cc | ||
currentspeakermonitor.h | ||
externalhmac.cc | ||
externalhmac.h | ||
mediamonitor.cc | ||
mediamonitor.h | ||
mediarecorder_unittest.cc | ||
mediarecorder.cc | ||
mediarecorder.h | ||
mediasession_unittest.cc | ||
mediasession.cc | ||
mediasession.h | ||
mediasink.h | ||
planarfunctions_unittest.cc | ||
rtcpmuxfilter_unittest.cc | ||
rtcpmuxfilter.cc | ||
rtcpmuxfilter.h | ||
soundclip.cc | ||
soundclip.h | ||
srtpfilter_unittest.cc | ||
srtpfilter.cc | ||
srtpfilter.h | ||
typewrapping.h.pump | ||
typingmonitor_unittest.cc | ||
typingmonitor.cc | ||
typingmonitor.h | ||
voicechannel.h | ||
yuvscaler_unittest.cc |