summaryrefslogtreecommitdiffstats
path: root/src/gui/painting
diff options
context:
space:
mode:
authorIvan Tkachenko <me@ratijas.tk>2022-01-12 21:09:45 +0300
committerIvan Tkachenko <me@ratijas.tk>2022-01-14 01:38:14 +0000
commit3215416e3c07e662f5ea99c82d4f8b08340be005 (patch)
treeb203716df186868690cd8a3528d629a72eeae8a9 /src/gui/painting
parentfc738e3f51e4474b05e99d09c9fb5268ec9aebc4 (diff)
QPathEdge: Fix array initialization
We had a copy-paste error there: not all array members were initialized. Pointed out by PVS-Studio static analysis tool: https://habr.com/ru/company/pvs-studio/blog/542760 Co-Authored-By: Marc Mutz <marc.mutz@qt.io> Pick-to: 6.3 6.2 5.15 Change-Id: I06a4f2cd928846eab6330af014981fd0a3170ba0 Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Diffstat (limited to 'src/gui/painting')
-rw-r--r--src/gui/painting/qpathclipper_p.h6
1 files changed, 1 insertions, 5 deletions
diff --git a/src/gui/painting/qpathclipper_p.h b/src/gui/painting/qpathclipper_p.h
index 6f712c396e..297844f327 100644
--- a/src/gui/painting/qpathclipper_p.h
+++ b/src/gui/painting/qpathclipper_p.h
@@ -156,7 +156,7 @@ public:
int vertex(Direction direction) const;
private:
- int m_next[2][2];
+ int m_next[2][2] = { { -1, -1 }, { -1, -1 } };
};
class QPathSegments
@@ -296,10 +296,6 @@ inline QPathEdge::QPathEdge(int a, int b)
, angle(0)
, invAngle(0)
{
- m_next[0][0] = -1;
- m_next[1][0] = -1;
- m_next[0][0] = -1;
- m_next[1][0] = -1;
}
inline int QPathEdge::next(Traversal traversal, Direction direction) const