0eb15ed7b806125774bd13fb214aeb403e2c6857 |
|
17-Dec-2015 |
kwiberg <kwiberg@webrtc.org> |
Don't call the Pass methods of rtc::Buffer, rtc::scoped_ptr, and rtc::ScopedVector We can now use std::move instead! This CL leaves the Pass methods in place; a follow-up CL will add deprecation annotations to them. Review URL: https://codereview.webrtc.org/1460043002 Cr-Commit-Position: refs/heads/master@{#11064}
/external/webrtc/webrtc/base/buffer.cc
|
9478437fdea4eb31b92ffe0c10368fe5bc9b9e16 |
|
20-Apr-2015 |
Karl Wiberg <kwiberg@webrtc.org> |
rtc::Buffer improvements 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}
/external/webrtc/webrtc/base/buffer.cc
|
eebcab5ce99d3e8641dd92a569916b0d24e29fca |
|
24-Mar-2015 |
kwiberg@webrtc.org <kwiberg@webrtc.org> |
rtc::Buffer: Rename length to size, for conformance with the STL And add a constructor for creating an uninitialized Buffer of a specified size. (I intend to follow up with more Buffer changes, but since it's rather widely used, the rename is quite noisy and works better as a separate CL.) R=tommi@webrtc.org Review URL: https://webrtc-codereview.appspot.com/48579004 Cr-Commit-Position: refs/heads/master@{#8841} git-svn-id: http://webrtc.googlecode.com/svn/trunk@8841 4adac7df-926f-26a2-2b94-8c16560cd09d
/external/webrtc/webrtc/base/buffer.cc
|
67186fe00cc68cbe03aa66d17fb4962458ca96d2 |
|
09-Mar-2015 |
kwiberg@webrtc.org <kwiberg@webrtc.org> |
Fix clang style warnings in webrtc/base Mostly this consists of marking functions with override when applicable, and moving function bodies from .h to .cc files. Not inlining virtual functions with simple bodies such as { return false; } strikes me as probably losing more in readability than we gain in binary size and compilation time, but I guess it's just like any other case where enabling a generally good warning forces us to write slightly worse code in a couple of places. BUG=163 R=kjellander@webrtc.org, tommi@webrtc.org Review URL: https://webrtc-codereview.appspot.com/47429004 Cr-Commit-Position: refs/heads/master@{#8656} git-svn-id: http://webrtc.googlecode.com/svn/trunk@8656 4adac7df-926f-26a2-2b94-8c16560cd09d
/external/webrtc/webrtc/base/buffer.cc
|