diff options
author | Kevin Funk <kevin.funk@kdab.com> | 2019-03-12 11:46:26 +0100 |
---|---|---|
committer | Kevin Funk <kevin.funk@kdab.com> | 2019-03-14 07:37:52 +0000 |
commit | 41e7b71c410b77a81d09d3cc2e169ffd7975b4d2 (patch) | |
tree | fd0722a70d1aedf8567cc11babd10adcbbd1e797 /src/gui/painting/qpathclipper_p.h | |
parent | b35eec360d4d88d094094fb54c101fad6cee5768 (diff) |
More nullptr usage in headers
Diff generated by running clang-tidy's modernize-use-nullptr checker on
the CMake-based Qt version.
Skipping src/3rdparty, examples/, tests/
Change-Id: Ib182074e2e2fd52f63093f73b3e2e4c0cb7af188
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'src/gui/painting/qpathclipper_p.h')
-rw-r--r-- | src/gui/painting/qpathclipper_p.h | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/gui/painting/qpathclipper_p.h b/src/gui/painting/qpathclipper_p.h index c25a479807..9444a87b71 100644 --- a/src/gui/painting/qpathclipper_p.h +++ b/src/gui/painting/qpathclipper_p.h @@ -82,7 +82,7 @@ public: bool intersect(); bool contains(); - static bool pathToRect(const QPainterPath &path, QRectF *rect = 0); + static bool pathToRect(const QPainterPath &path, QRectF *rect = nullptr); static QPainterPath intersect(const QPainterPath &path, const QRectF &rect); private: @@ -394,7 +394,7 @@ inline const QPathSegments::Intersection *QPathSegments::intersectionAt(int inde { const int intersection = m_segments.at(index).intersection; if (intersection < 0) - return 0; + return nullptr; else return &m_intersections.at(intersection); } @@ -428,12 +428,12 @@ inline int QWingedEdge::edgeCount() const inline QPathEdge *QWingedEdge::edge(int edge) { - return edge < 0 ? 0 : &m_edges.at(edge); + return edge < 0 ? nullptr : &m_edges.at(edge); } inline const QPathEdge *QWingedEdge::edge(int edge) const { - return edge < 0 ? 0 : &m_edges.at(edge); + return edge < 0 ? nullptr : &m_edges.at(edge); } inline int QWingedEdge::vertexCount() const @@ -449,12 +449,12 @@ inline int QWingedEdge::addVertex(const QPointF &p) inline QPathVertex *QWingedEdge::vertex(int vertex) { - return vertex < 0 ? 0 : &m_vertices.at(vertex); + return vertex < 0 ? nullptr : &m_vertices.at(vertex); } inline const QPathVertex *QWingedEdge::vertex(int vertex) const { - return vertex < 0 ? 0 : &m_vertices.at(vertex); + return vertex < 0 ? nullptr : &m_vertices.at(vertex); } inline QPathEdge::Traversal QWingedEdge::flip(QPathEdge::Traversal traversal) |