[poppler] poppler/PDFDoc.cc

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Wed Feb 9 14:53:22 UTC 2022


 poppler/PDFDoc.cc |   36 +++++++++---------------------------
 1 file changed, 9 insertions(+), 27 deletions(-)

New commits:
commit 49ee0593c690bada2f17370dcf5b8f387998c040
Author: Albert Astals Cid <aacid at kde.org>
Date:   Wed Feb 9 15:41:30 2022 +0100

    PDFDoc: Remove useless checks in destructor

diff --git a/poppler/PDFDoc.cc b/poppler/PDFDoc.cc
index 82affced..71068c31 100644
--- a/poppler/PDFDoc.cc
+++ b/poppler/PDFDoc.cc
@@ -293,34 +293,16 @@ PDFDoc::~PDFDoc()
         gfree(pageCache);
     }
     delete secHdlr;
-    if (outline) {
-        delete outline;
-    }
-    if (catalog) {
-        delete catalog;
-    }
-    if (xref) {
-        delete xref;
-    }
-    if (hints) {
-        delete hints;
-    }
-    if (linearization) {
-        delete linearization;
-    }
-    if (str) {
-        delete str;
-    }
-    if (file) {
-        delete file;
-    }
-    if (fileName) {
-        delete fileName;
-    }
+    delete outline;
+    delete catalog;
+    delete xref;
+    delete hints;
+    delete linearization;
+    delete str;
+    delete file;
+    delete fileName;
 #ifdef _WIN32
-    if (fileNameU) {
-        gfree(fileNameU);
-    }
+    gfree(fileNameU);
 #endif
 }
 


More information about the poppler mailing list