Commit 035760e
committed
prevector::swap: fix (unreached) data corruption
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.
backports bitcoin/bitcoin@a7af72a1 parent 0e71400 commit 035760e
1 file changed
+1
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
412 | 412 | | |
413 | 413 | | |
414 | 414 | | |
415 | | - | |
416 | | - | |
417 | | - | |
418 | | - | |
419 | | - | |
420 | | - | |
| 415 | + | |
421 | 416 | | |
422 | 417 | | |
423 | 418 | | |
| |||
0 commit comments