Skip to content

Commit

Permalink
[QDomNodePrivate] delete unnecessary pointer check from the statement
Browse files Browse the repository at this point in the history
- prev pointer never can be null here, so the check can be deleted.

Ammends 948599e

Pick-to: 6.8 6.9
Change-Id: Ie194f5f0432f6da5f6471328193112c970f623b6
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
  • Loading branch information
qt-tatiana committed Dec 12, 2024
1 parent 73221d2 commit d991572
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/xml/dom/qdom.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1445,7 +1445,7 @@ void QDomNodePrivate::saveSubTree(const QDomNodePrivate *n, QTextStream &s,
const QDomNodePrivate *prev = root;
root = root->next;
// Close QDomElementPrivate groups
while (!root && prev && (layerDepth > 0)) {
while (!root && (layerDepth > 0)) {
root = prev->parent();
layerDepth --;
root->afterSave(s, layerDepth + branchDepth, indent);
Expand Down

0 comments on commit d991572

Please sign in to comment.