diff options
author | Caolán McNamara <caolan.mcnamara@collabora.com> | 2024-11-09 15:26:00 +0000 |
---|---|---|
committer | Caolán McNamara <caolan.mcnamara@collabora.com> | 2024-11-09 20:21:51 +0100 |
commit | 9c3133fc335ff88adb1780f09d34f9907b1ccb8f (patch) | |
tree | f6b00aef8658cdc530534e702cec6c4cfe5a47a4 /basegfx/source/polygon/b3dpolygontools.cxx | |
parent | 6e9f865789e6c4fabe35c0eb28302217c5c5b9d8 (diff) |
cid#1634585 Use of auto that causes a copy
and
cid#1634580 Use of auto that causes a copy
cid#1634578 Use of auto that causes a copy
Change-Id: Iad2ec6285b1eb923f3f30e8b18ee577d53ca140b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176312
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Diffstat (limited to 'basegfx/source/polygon/b3dpolygontools.cxx')
-rw-r--r-- | basegfx/source/polygon/b3dpolygontools.cxx | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/basegfx/source/polygon/b3dpolygontools.cxx b/basegfx/source/polygon/b3dpolygontools.cxx index 2f4ed7f7d691..5f0b8c84ed9b 100644 --- a/basegfx/source/polygon/b3dpolygontools.cxx +++ b/basegfx/source/polygon/b3dpolygontools.cxx @@ -103,17 +103,14 @@ namespace basegfx::utils pLineTarget->clear(); } - // provide callback as lambda - const auto rLineCallback( - nullptr == pLineTarget - ? std::function<void(const basegfx::B3DPolygon&)>() - : [&pLineTarget](const basegfx::B3DPolygon& rSnippet){ pLineTarget->append(rSnippet); }); - // call version that uses callbacks applyLineDashing( rCandidate, rDotDashArray, - rLineCallback, + // provide callback as lambda + (!pLineTarget + ? std::function<void(const basegfx::B3DPolygon&)>() + : [&pLineTarget](const basegfx::B3DPolygon& rSnippet){ pLineTarget->append(rSnippet); }), fDotDashLength); } |