diff options
author | Ivan Tkachenko <me@ratijas.tk> | 2022-01-12 21:09:45 +0300 |
---|---|---|
committer | Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> | 2022-01-14 03:58:45 +0000 |
commit | 5bafba52deff6ca3f9d382ca11f265594a6b76b9 (patch) | |
tree | 809689f107df66e4ddfa3043cc139297e57a41cf /src/gui/painting | |
parent | c9602370f06ba0a6c45dfe22ce77f7f07123d5bc (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>
Change-Id: I06a4f2cd928846eab6330af014981fd0a3170ba0
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
(cherry picked from commit 3215416e3c07e662f5ea99c82d4f8b08340be005)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'src/gui/painting')
-rw-r--r-- | src/gui/painting/qpathclipper_p.h | 6 |
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 |