From 441ff065e5d212f139411416066813514c3ae1a2 Mon Sep 17 00:00:00 2001 From: Volker Hilsheimer Date: Thu, 6 May 2021 11:10:38 +0200 Subject: [PATCH] Fix compiler warning, explicitly use 64bit shift MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Reviewed-by: Tomi Korpipää Reviewed-by: Richard Moe Gustavsen --- src/widgets/graphicsview/qgraphicsscene_bsp.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/widgets/graphicsview/qgraphicsscene_bsp.cpp b/src/widgets/graphicsview/qgraphicsscene_bsp.cpp index 9b05428c0a..437d413284 100644 --- a/src/widgets/graphicsview/qgraphicsscene_bsp.cpp +++ b/src/widgets/graphicsview/qgraphicsscene_bsp.cpp @@ -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()); initialize(rect, depth, 0);