From faea8e266114abcc9ebd517a552bf7d0e6770575 Mon Sep 17 00:00:00 2001 From: Lars Knoll Date: Wed, 11 Nov 2020 13:47:29 +0100 Subject: Remove unused code MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I22f377c10a556fbb011ec98094d5a61ee3f63867 Reviewed-by: MÃ¥rten Nordheim Reviewed-by: Andrei Golubev Reviewed-by: Thiago Macieira --- src/corelib/tools/qarraydataops.h | 24 ------------------------ 1 file changed, 24 deletions(-) (limited to 'src/corelib') diff --git a/src/corelib/tools/qarraydataops.h b/src/corelib/tools/qarraydataops.h index 020ffee4e1..fe81e66a82 100644 --- a/src/corelib/tools/qarraydataops.h +++ b/src/corelib/tools/qarraydataops.h @@ -146,30 +146,6 @@ struct QArrayExceptionSafetyPrimitives (end - begin) * sizeof(T)); } }; - - // Watches passed iterator. Moves the data range (defined as a start - // iterator and a length) to the new starting position at the end of object - // lifetime. - struct Mover - { - T *&destination; - const T *const source; - size_t n; - qsizetype &size; - - static_assert(QTypeInfo::isRelocatable, "Type must be relocatable"); - - Mover(T *&start, size_t length, qsizetype &sz) noexcept - : destination(start), source(start), n(length), size(sz) - { } - ~Mover() noexcept - { - if (destination != source) - ::memmove(static_cast(destination), static_cast(source), - n * sizeof(T)); - size -= source > destination ? source - destination : destination - source; - } - }; }; // Tags for compile-time dispatch based on backwards vs forward growing policy -- cgit v1.2.3