diff options
Diffstat (limited to 'src/gui/painting/qpathclipper.cpp')
-rw-r--r-- | src/gui/painting/qpathclipper.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/gui/painting/qpathclipper.cpp b/src/gui/painting/qpathclipper.cpp index e0b4e5152c..10a0639b53 100644 --- a/src/gui/painting/qpathclipper.cpp +++ b/src/gui/painting/qpathclipper.cpp @@ -63,6 +63,7 @@ struct QIntersection QPointF pos; }; +Q_DECLARE_TYPEINFO(QIntersection, Q_PRIMITIVE_TYPE); class QIntersectionFinder { @@ -649,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)); |