diff options
author | Andrei Golubev <andrei.golubev@qt.io> | 2021-04-25 17:52:14 +0200 |
---|---|---|
committer | Andrei Golubev <andrei.golubev@qt.io> | 2021-04-27 14:12:34 +0200 |
commit | dbb001eb1b3c8208ecaf2cf6ff34a859222a1b53 (patch) | |
tree | 3efda83650372814e97a41fe92059c497af0153f /tests/auto | |
parent | 15a1ec21528b8851a943698310c18742f1983094 (diff) |
Change QList's insert() and emplace() to always invalidate [pos, end())
Drop the "move left if pos <= size / 2" path in favor of reference
stability of insert and emplace operations
Leave the insert(0, ...) and emplace(0, ...) as special cases for
prepend optimization as invalidating [begin, end()) practically means
that we can reallocate behind the scenes
Doing this also simplifies the code a bit
Task-number: QTBUG-93019
Change-Id: I7c248f96d687e94a6a38f81ade901619ff2b4733
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
(cherry picked from commit 5e76c2acff2c70f2893306b16aeba230f3d6114a)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'tests/auto')
0 files changed, 0 insertions, 0 deletions