aboutsummaryrefslogtreecommitdiff
path: root/src/prevector.h
AgeCommit message (Collapse)Author
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