From e0846b7abe78e55bc1e959143d980208077b13ca Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Thu, 23 Nov 2017 10:39:41 +0200 Subject: loplugin:simplifybool can't invert conditions involving float types so revert some of the changes from commit 7a1c21e53fc4733a4bb52282ce0098fcc085ab0e loplugin:simplifybool for negation of comparison operator Change-Id: I937d575b86c1e418805d399b0dc16ae91876b4fe Reviewed-on: https://gerrit.libreoffice.org/45130 Reviewed-by: Noel Grandin Tested-by: Noel Grandin --- sal/rtl/math.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sal/rtl/math.cxx') diff --git a/sal/rtl/math.cxx b/sal/rtl/math.cxx index a9b30a4dc498..96c5843dcfea 100644 --- a/sal/rtl/math.cxx +++ b/sal/rtl/math.cxx @@ -170,7 +170,7 @@ bool isRepresentableInteger(double fAbsValue) // this here. double fInt; return (nInt <= kMaxInt && - (((fInt = static_cast< double >(nInt)) >= fAbsValue) && (fInt <= fAbsValue))); + (!((fInt = static_cast< double >(nInt)) < fAbsValue) && !(fInt > fAbsValue))); } return false; } -- cgit