code changes to help the static code analyzer

This commit is contained in:
Uwe Rathmann 2021-07-12 08:26:04 +02:00
parent 54f689b9a4
commit 34b158b023
1 changed files with 6 additions and 1 deletions

View File

@ -116,8 +116,8 @@ void QskBoxNode::setBoxData( const QRectF& rect,
} }
} }
bool maybeFlat = false;
#if 0
/* /*
Always using the same material result in a better batching Always using the same material result in a better batching
but wastes some memory. when we have a solid color. but wastes some memory. when we have a solid color.
@ -125,6 +125,8 @@ void QskBoxNode::setBoxData( const QRectF& rect,
but for the moment we go with performance. but for the moment we go with performance.
*/ */
bool maybeFlat = true;
if ( maybeFlat ) if ( maybeFlat )
{ {
if ( ( hasFill && hasBorder ) || if ( ( hasFill && hasBorder ) ||
@ -134,6 +136,9 @@ void QskBoxNode::setBoxData( const QRectF& rect,
maybeFlat = false; maybeFlat = false;
} }
} }
#else
bool maybeFlat = false;
#endif
QskBoxRenderer renderer; QskBoxRenderer renderer;