- use sliced() instead of mid(), since we know we call sliced()
in-contract
- replace the manual memmove() with calls to QBA::remove(), but first
resize() to tailOffset, and only then remove(0, headOffset), so we
only move Chunk::size() bytes, as the old code did
- don't bother updating the offset members, as we're restricted to
rvalues now, and we only need to leave behind a partially-formed
object
This code shows that we desperately need QBA::slice() and/or an rvalue
overload of QBA::sliced(), cf. QTBUG-99218. Add a comment to use these
functions when they become available.
Change-Id: I5d8c7363d443dff69338f6f6a7b4bff9957917ec
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Alex Trotsenko <alex1973tr@gmail.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>