diff options
author | Andrei Golubev <andrei.golubev@qt.io> | 2021-04-25 17:52:14 +0200 |
---|---|---|
committer | Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> | 2021-04-27 07:39:56 +0000 |
commit | 24c75a28a61b0a4d2898dea5f022a82b1d6b7878 (patch) | |
tree | 17a5386abc9b671769e4575f4d2be05c6186c1ad /tests/auto/corelib/text/qbytearray/tst_qbytearray.cpp | |
parent | 36e0a4a98fda02b4ab5e8686b1c56f173c2c2f48 (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/corelib/text/qbytearray/tst_qbytearray.cpp')
0 files changed, 0 insertions, 0 deletions