From 0475460102411979ab51c365cb2bec2c05b69cb4 Mon Sep 17 00:00:00 2001 From: Jarek Kobus Date: Mon, 22 Jun 2020 11:06:12 +0200 Subject: Use QList instead of QVector in corelib Applied to headers only. Source file to be changed separately. Omitted statemachine for now to avoid conflicts. Omitted qmetatype.h for now - to be handled later. Task-number: QTBUG-84469 Change-Id: I317376037a62467c313467d92955ad0b7473aa97 Reviewed-by: Sona Kurazyan --- src/corelib/tools/qflatmap_p.h | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'src/corelib/tools/qflatmap_p.h') diff --git a/src/corelib/tools/qflatmap_p.h b/src/corelib/tools/qflatmap_p.h index 82a1068d34..bf0efb2543 100644 --- a/src/corelib/tools/qflatmap_p.h +++ b/src/corelib/tools/qflatmap_p.h @@ -51,7 +51,7 @@ // We mean it. // -#include "qvector.h" +#include "qlist.h" #include #include @@ -66,7 +66,7 @@ QT_BEGIN_NAMESPACE /* QFlatMap provides an associative container backed by sorted sequential - containers. By default, QVector is used. + containers. By default, QList is used. Keys and values are stored in two separate containers. This provides improved cache locality for key iteration and makes keys() and values() fast @@ -105,10 +105,8 @@ public: } }; -template , - class KeyContainer = QVector, - class MappedContainer = QVector> +template, class KeyContainer = QList, + class MappedContainer = QList> class QFlatMap : private QFlatMapValueCompare { using full_map_t = QFlatMap; -- cgit v1.2.3