Fix compiler warning, explicitly use 64bit shift

The 1 literal is an int, shifted by an int, and then passed into resize,
which takes a 64 bit value. This makes MSVC complain about

warning C4334: '<<': result of 32-bit shift implicitly converted to 64
bits (was 64-bit shift intended?)

Silence that warning by explicitly making the 1 a 64bit long long.

Change-Id: Ica354166de4adae20e05e176dc72b7ccd1af053f
Reviewed-by: Oliver Eftevaag <oliver.eftevaag@qt.io>
Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
This commit is contained in:
Volker Hilsheimer 2021-05-06 11:10:38 +02:00
parent 6fd480142b
commit 441ff065e5

View File

@ -103,7 +103,7 @@ void QGraphicsSceneBspTree::initialize(const QRectF &rect, int depth)
leafCnt = 0;
nodes.resize((1 << (depth + 1)) - 1);
nodes.fill(Node());
leaves.resize(1 << depth);
leaves.resize(1ll << depth);
leaves.fill(QList<QGraphicsItem *>());
initialize(rect, depth, 0);