From eea5dca893d75e8d372742a3f152e9e3d17647ff Mon Sep 17 00:00:00 2001 From: Yann Lossouarn Date: Fri, 23 Feb 2024 18:34:20 +0100 Subject: [PATCH] Code smell & performance improvement : Capture large object "watermarkData" by reference. --- src/app/puzzle/scene/vpgraphicstilegrid.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/puzzle/scene/vpgraphicstilegrid.cpp b/src/app/puzzle/scene/vpgraphicstilegrid.cpp index fe0dcac0e..dc6436788 100644 --- a/src/app/puzzle/scene/vpgraphicstilegrid.cpp +++ b/src/app/puzzle/scene/vpgraphicstilegrid.cpp @@ -167,7 +167,7 @@ void VPGraphicsTileGrid::paint(QPainter *painter, const QStyleOptionGraphicsItem 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() && watermarkData.opacity > 0)