FrameSVG: Delete redundant checks
Summary: There is no need to check whether `cachedBackground` is null, and if it's null, return a null pixmap. Reviewers: #plasma, #frameworks, apol Reviewed By: apol Subscribers: kde-frameworks-devel Tags: #frameworks Differential Revision: https://phabricator.kde.org/D13287
This commit is contained in:
parent
a363815a79
commit
b169aa50f9
@ -449,9 +449,6 @@ QPixmap FrameSvgPrivate::alphaMask()
|
||||
if (maskPrefix.isNull()) {
|
||||
if (frame->cachedBackground.isNull()) {
|
||||
generateBackground(frame);
|
||||
if (frame->cachedBackground.isNull()) {
|
||||
return QPixmap();
|
||||
}
|
||||
}
|
||||
|
||||
return frame->cachedBackground;
|
||||
@ -496,10 +493,6 @@ QPixmap FrameSvgPrivate::alphaMask()
|
||||
maskFrame->cachedBackground = QPixmap();
|
||||
|
||||
generateBackground(maskFrame);
|
||||
|
||||
if (maskFrame->cachedBackground.isNull()) {
|
||||
return QPixmap();
|
||||
}
|
||||
}
|
||||
|
||||
return maskFrame->cachedBackground;
|
||||
|
Loading…
x
Reference in New Issue
Block a user