aboutsummaryrefslogtreecommitdiff
path: root/src/prevector.h
AgeCommit message (Collapse)Author
2017-03-14Merge #9505: Prevector Quick DestructWladimir J. van der Laan
45a5aaf Only call clear on prevector if it isn't trivially destructible and don't loop in clear (Jeremy Rubin) aaa02e7 Add prevector destructor benchmark (Jeremy Rubin) Tree-SHA512: 52bc8163b65b71310252f2d578349d0ddc364a6c23795c5e06e101f5449f04c96cbdca41c0cffb1974b984b8e33006471137d92b8dd4a81a98e922610a94132a
2017-02-27prevector: assert successful allocationCory Fields
2017-01-10Only call clear on prevector if it isn't trivially destructible and don't ↵Jeremy Rubin
loop in clear
2016-12-31Increment MIT Licence copyright header year on files modified in 2016isle2983
Edited via: $ contrib/devtools/copyright_header.py update .
2016-12-21Make CScript (and prevector) c++11 movable.Pieter Wuille
Such moves are used when reallocating vectors that contain them, for example.
2016-10-02serialize: Deprecate `begin_ptr` / `end_ptr`Wladimir J. van der Laan
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.
2016-09-30prevector: add C++11-like data() methodWladimir J. van der Laan
This returns a pointer to the beginning of the vector's data.
2016-04-16prevector::swap: fix (unreached) data corruptionKaz Wesley
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.
2016-04-16prevector: destroy elements only via erase()Kaz Wesley
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.
2016-01-05Add missing copyright headersMarcoFalke
2015-12-02Name union to prevent compiler warningPavel Janík
2015-11-13Prevector typePieter Wuille