Code smell & performance improvement : Capture large object "watermarkData" by reference.
This commit is contained in:
parent
7ff8aed6bc
commit
eea5dca893
|
@ -167,7 +167,7 @@ void VPGraphicsTileGrid::paint(QPainter *painter, const QStyleOptionGraphicsItem
|
||||||
|
|
||||||
VWatermarkData const watermarkData = layout->TileFactory()->WatermarkData();
|
VWatermarkData const watermarkData = layout->TileFactory()->WatermarkData();
|
||||||
|
|
||||||
auto PaintWatermark = [painter, layout, xScale, yScale, watermarkData](const QRectF &img)
|
auto PaintWatermark = [painter, layout, xScale, yScale, &watermarkData](const QRectF &img)
|
||||||
{
|
{
|
||||||
if (not layout->LayoutSettings().WatermarkPath().isEmpty() && layout->LayoutSettings().GetShowWatermark() &&
|
if (not layout->LayoutSettings().WatermarkPath().isEmpty() && layout->LayoutSettings().GetShowWatermark() &&
|
||||||
watermarkData.opacity > 0)
|
watermarkData.opacity > 0)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user