vcl/source/gdi/CommonSalLayout.cxx | 6 +++--- vcl/source/outdev/text.cxx | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-)
New commits: commit 01cabd3f998197f277300bcc71fc80e80642caed Author: Mike Kaganski <mike.kagan...@collabora.com> AuthorDate: Fri Apr 12 09:56:29 2024 +0100 Commit: Mike Kaganski <mike.kagan...@collabora.com> CommitDate: Sat Apr 13 01:20:18 2024 +0200 Don't use lround when assigning to a double Change-Id: Ifdfd351cf1f2848b754ec7a4c6f6cb9a56f478d5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165939 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kagan...@collabora.com> diff --git a/vcl/source/gdi/CommonSalLayout.cxx b/vcl/source/gdi/CommonSalLayout.cxx index fc3a2a2bf79c..8211b9ea6aa9 100644 --- a/vcl/source/gdi/CommonSalLayout.cxx +++ b/vcl/source/gdi/CommonSalLayout.cxx @@ -555,9 +555,9 @@ bool GenericSalLayout::LayoutText(vcl::text::ImplLayoutArgs& rArgs, const SalLay nYOffset = nYOffset * nYScale; if (!GetSubpixelPositioning()) { - nAdvance = std::lround(nAdvance); - nXOffset = std::lround(nXOffset); - nYOffset = std::lround(nYOffset); + nAdvance = std::round(nAdvance); + nXOffset = std::round(nXOffset); + nYOffset = std::round(nYOffset); } basegfx::B2DPoint aNewPos(aCurrPos.getX() + nXOffset, aCurrPos.getY() + nYOffset); diff --git a/vcl/source/outdev/text.cxx b/vcl/source/outdev/text.cxx index 80fb2b94bd40..ed782acf2ffb 100644 --- a/vcl/source/outdev/text.cxx +++ b/vcl/source/outdev/text.cxx @@ -1121,7 +1121,7 @@ std::unique_ptr<SalLayout> OutputDevice::ImplLayout(const OUString& rOrigStr, { for(int i = 0; i < nLen; ++i) xDXPixelArray[i] = pDXArray.get(i); - nEndGlyphCoord = std::lround(xDXPixelArray[nLen - 1]); + nEndGlyphCoord = std::round(xDXPixelArray[nLen - 1]); } aLayoutArgs.SetDXArray(xDXPixelArray.get());