vcl/source/outdev/map.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
New commits: commit 9deecb5e4ba12c94b2dc8f331eb512296e1ab702 Author: Caolán McNamara <caol...@redhat.com> AuthorDate: Fri Aug 26 13:03:03 2022 +0100 Commit: Caolán McNamara <caol...@redhat.com> CommitDate: Fri Aug 26 14:56:02 2022 +0200 improve ImplSubPixelToLogic sanity check Change-Id: Iae8620e3ef4f989555e0014459fcd8f152db843b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138872 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caol...@redhat.com> diff --git a/vcl/source/outdev/map.cxx b/vcl/source/outdev/map.cxx index 96589cad6ff7..5d1016df69ca 100644 --- a/vcl/source/outdev/map.cxx +++ b/vcl/source/outdev/map.cxx @@ -287,7 +287,7 @@ static tools::Long ImplSubPixelToLogic(bool bCheck, double n, tools::Long nDPI, double nRes = n * nMapDenom / nMapNum / nDPI; tools::Long nRet(std::round(nRes)); - assert(!bCheck || n == static_cast<double>(nRet) * nMapNum * nDPI / nMapDenom); (void)bCheck; + assert(!bCheck || rtl_math_approxValue(n) == rtl_math_approxValue(static_cast<double>(nRet) * nMapNum * nDPI / nMapDenom)); (void)bCheck; return nRet; }