Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 15ab437b authored by Jack He's avatar Jack He
Browse files

GD-Common: Add CircularBuffer::Drain() method

* Drain() allows a circular buffer to return and clear
  its content so that one can clear a circular buffer
  in-place
* Moreover, Drain() uses move semantic to avoid copying
  its content and hence is more efficient
* Modify Pull() to use range-based initialization to do
  blocked copy that tends to be more efficient
* Add circular buffer unit test to compilation target
  and presubmit

Bug: 180569201
Test: gd/cert/run
Test: bluetooth_test_gd
Tag: #gd-refactor
Change-Id: Ic94f70fc862f244dcdc6b9d5f2526c45d0b8eb52
parent 1adbba45
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment