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

Hossein (via logerrit) logerrit at kemper.freedesktop.org
Sun Sep 26 14:41:10 UTC 2021


 emfio/source/reader/wmfreader.cxx |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 4fe1368f24d9f6230852fbf58b61f6c255cadb60
Author:     Hossein <hossein at libreoffice.org>
AuthorDate: Sun Sep 26 10:09:10 2021 +0200
Commit:     Mike Kaganski <mike.kaganski at collabora.com>
CommitDate: Sun Sep 26 16:40:36 2021 +0200

    Removing unneeded check
    
    The condition nPlanes != 1 is checked in the previous if statement and if it the content of nPlanes is anything other than 1, it would have used the break to exit the switch case. Thus, there is no need to check nPlanes == 1 again.
    
    Change-Id: I1e07b48af16de40d39eabb6f2b666e41b0b0432e
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122451
    Tested-by: Jenkins
    Reviewed-by: Mike Kaganski <mike.kaganski at collabora.com>

diff --git a/emfio/source/reader/wmfreader.cxx b/emfio/source/reader/wmfreader.cxx
index 831a8eb4a837..00542fa9acf7 100644
--- a/emfio/source/reader/wmfreader.cxx
+++ b/emfio/source/reader/wmfreader.cxx
@@ -832,7 +832,7 @@ namespace emfio
                     break;
                 }
                 const vcl::PixelFormat ePixelFormat = vcl::bitDepthToPixelFormat( nBitCount );
-                bool bOk = nWidth > 0 && nHeight > 0 && nBytesPerScan > 0 && nPlanes == 1 && ePixelFormat != vcl::PixelFormat::INVALID;
+                bool bOk = nWidth > 0 && nHeight > 0 && nBytesPerScan > 0 && ePixelFormat != vcl::PixelFormat::INVALID;
                 if (bOk)
                 {
                     // must be enough data to fulfil the request


More information about the Libreoffice-commits mailing list