aboutsummaryrefslogtreecommitdiff
path: root/src/prevector.h
Commit message (Collapse)AuthorAgeFilesLines
* prevector: assert successful allocationCory Fields2017-02-281-0/+6
| | | | | Github-Pull: #9856 Rebased-From: d4ee7baef729da5e18b5e5c3d6ddb5b97df8d4e4
* Increment MIT Licence copyright header year on files modified in 2016isle29832016-12-311-1/+1
| | | | | | Edited via: $ contrib/devtools/copyright_header.py update .
* Make CScript (and prevector) c++11 movable.Pieter Wuille2016-12-211-0/+9
| | | | | Such moves are used when reallocating vectors that contain them, for example.
* serialize: Deprecate `begin_ptr` / `end_ptr`Wladimir J. van der Laan2016-10-021-1/+1
| | | | | | | Implement `begin_ptr` and `end_ptr` in terms of C++11 code, and add a comment that they are deprecated. Follow-up to developer notes update in 654a21162252294b7dbd6c982fec88008af7335e.
* prevector: add C++11-like data() methodWladimir J. van der Laan2016-09-301-0/+8
| | | | This returns a pointer to the beginning of the vector's data.
* prevector::swap: fix (unreached) data corruptionKaz Wesley2016-04-161-6/+1
| | | | | | | | | | swap was using an incorrect condition to determine when to apply an optimization (not swapping the full direct[] when swapping two indirect prevectors). Rather than correct the optimization I'm removing it for simplicity. Removing this optimization minutely improves performance in the typical (currently only) usage of member swap(), which is swapping with a freshly value-initialized object.
* prevector: destroy elements only via erase()Kaz Wesley2016-04-161-8/+4
| | | | | | | | | Fixes a bug in which pop_back did not call the deleted item's destructor. Using the most general erase() implementation to implement all the others prevents similar bugs because the coupling between deallocation and destructor invocation only needs to be maintained in one place. Also reduces duplication of complex memmove logic.
* Add missing copyright headersMarcoFalke2016-01-051-0/+4
|
* Name union to prevent compiler warningPavel Janík2015-12-021-1/+1
|
* Prevector typePieter Wuille2015-11-131-0/+486