[Libreoffice-commits] core.git: basegfx/source

Mike Kaganski (via logerrit) logerrit at kemper.freedesktop.org
Tue Jul 27 13:38:35 UTC 2021


 basegfx/source/vector/b3dvector.cxx |    9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

New commits:
commit b24a1bcab389c0aefc1ddea9a1b81880f699df56
Author:     Mike Kaganski <mike.kaganski at collabora.com>
AuthorDate: Tue Jul 27 12:20:17 2021 +0200
Commit:     Mike Kaganski <mike.kaganski at collabora.com>
CommitDate: Tue Jul 27 15:38:00 2021 +0200

    Drop redundant check
    
    If value is not approximately equal to zero, its square root also is not
    
    Change-Id: I0a2c30a8a85c64406e3a8ea8cff2315f25c2226d
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119444
    Tested-by: Jenkins
    Reviewed-by: Mike Kaganski <mike.kaganski at collabora.com>

diff --git a/basegfx/source/vector/b3dvector.cxx b/basegfx/source/vector/b3dvector.cxx
index 7dd5acf57f36..002ee330f9f4 100644
--- a/basegfx/source/vector/b3dvector.cxx
+++ b/basegfx/source/vector/b3dvector.cxx
@@ -34,12 +34,9 @@ namespace basegfx
             {
                 fLen = sqrt(fLen);
 
-                if(!::basegfx::fTools::equalZero(fLen))
-                {
-                    mfX /= fLen;
-                    mfY /= fLen;
-                    mfZ /= fLen;
-                }
+                mfX /= fLen;
+                mfY /= fLen;
+                mfZ /= fLen;
             }
         }
 


More information about the Libreoffice-commits mailing list