summaryrefslogtreecommitdiffstats
path: root/src/gui/painting/qpathclipper.cpp
diff options
context:
space:
mode:
authorEirik Aavitsland <eirik.aavitsland@qt.io>2023-08-14 09:36:50 +0200
committerEirik Aavitsland <eirik.aavitsland@qt.io>2023-08-14 18:05:43 +0200
commitf8f23c43feb2fb233a8f047cd1b82259498d9aeb (patch)
tree59f21345df654bd0e209bb12f1705f4f1770afa9 /src/gui/painting/qpathclipper.cpp
parentf56fc425f9a103ed71697314196649641ef3691c (diff)
Avoid compiler warning
Under some configure options, gcc13 emits an intractable warning on this line. This patch works around it. Fixes: QTBUG-115809 Pick-to: 6.6 6.5 6.2 Change-Id: Ib63f2ad81ebdb1f609a7f42c25119c5ae29f08bb Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
Diffstat (limited to 'src/gui/painting/qpathclipper.cpp')
-rw-r--r--src/gui/painting/qpathclipper.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/gui/painting/qpathclipper.cpp b/src/gui/painting/qpathclipper.cpp
index 7ada65ce03..10a0639b53 100644
--- a/src/gui/painting/qpathclipper.cpp
+++ b/src/gui/painting/qpathclipper.cpp
@@ -650,7 +650,8 @@ int QKdPointTree::build(int begin, int end, int depth)
}
}
- qSwap(m_nodes.at(last), m_nodes.at(begin));
+ if (last != begin)
+ qSwap(m_nodes.at(last), m_nodes.at(begin));
if (last > begin)
m_nodes.at(last).left = &m_nodes.at(build(begin, last, depth + 1));