summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/wasm/qwasmintegration.cpp
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@intel.com>2025-10-21 20:55:08 +0000
committerThiago Macieira <thiago.macieira@intel.com>2025-11-13 06:05:22 -0700
commitb26df0ab5d335aa1e561aba1c3cfe642a26ee18c (patch)
tree7e51c9104bdea9b271df78f24730a7d806618477 /src/plugins/platforms/wasm/qwasmintegration.cpp
parentdf22526a38fe6999bdcf6b093f8e93af1c86f399 (diff)
QArrayDataOps::assign: improve for forward iterators (redux)
This differs from commit 37b37cddb67febd595cb06b54ac08f1e676ead4d in that it takes the prepend optimization into account in the new implementation, instead of leaving it up to the assign() caller. For the simple case of trivial types and identity projection, the fix was simple: just start copying from the beginning of the prepend optimization. For the non-identity projection or non-trivial types, there are now four possible regions (at most three of which can appear in any given condition) instead of three. And because there are two exit conditions for the prepend optimization and regular array, we must use iterators instead of a simple counter. This code is as exception-safe as the original: it isn't. If the copy constructors or copy assignment operators throw, the size of the container will not have been updated, so we'll either leak objects or access garbage ones when the container is destroyed. I don't care. Fixes: QTBUG-141366 Change-Id: Ibd7b16127e8a815b6725802029d082f1e39782b4 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Diffstat (limited to 'src/plugins/platforms/wasm/qwasmintegration.cpp')
0 files changed, 0 insertions, 0 deletions