From 34b158b023cc8a18a2ecfad8757ad43ca1775a43 Mon Sep 17 00:00:00 2001 From: Uwe Rathmann Date: Mon, 12 Jul 2021 08:26:04 +0200 Subject: [PATCH] code changes to help the static code analyzer --- src/nodes/QskBoxNode.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/nodes/QskBoxNode.cpp b/src/nodes/QskBoxNode.cpp index dea2695d..19a62767 100644 --- a/src/nodes/QskBoxNode.cpp +++ b/src/nodes/QskBoxNode.cpp @@ -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 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. */ + bool maybeFlat = true; + if ( maybeFlat ) { if ( ( hasFill && hasBorder ) || @@ -134,6 +136,9 @@ void QskBoxNode::setBoxData( const QRectF& rect, maybeFlat = false; } } +#else + bool maybeFlat = false; +#endif QskBoxRenderer renderer;