[poppler] splash/SplashFontFile.cc

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Thu Jan 20 23:16:45 UTC 2022


 splash/SplashFontFile.cc |   16 +++-------------
 1 file changed, 3 insertions(+), 13 deletions(-)

New commits:
commit d70e614b146b47066609c40ebba0e5c92ee6d487
Author: Albert Astals Cid <aacid at kde.org>
Date:   Fri Jan 21 00:09:38 2022 +0100

    Revert e2ec957c0174a36396c3e8c194f44a1f300a950f
    
    Until we depend on a newer gcc (>= 9.1)
    
    We still support gcc 8 and it seems it's not super obvious to use it
    there, might need linking to an extra library in some platforms,
    and honestly for the 1 warning on MSVC that this fixes
    it's not worth the effort to figure out how to link to that lib
    
    See Issue 1203 for more info.

diff --git a/splash/SplashFontFile.cc b/splash/SplashFontFile.cc
index e6e241c2..221b2957 100644
--- a/splash/SplashFontFile.cc
+++ b/splash/SplashFontFile.cc
@@ -12,7 +12,7 @@
 // under GPL version 2 or later
 //
 // Copyright (C) 2006 Takashi Iwai <tiwai at suse.de>
-// Copyright (C) 2008, 2021 Albert Astals Cid <aacid at kde.org>
+// Copyright (C) 2008 Albert Astals Cid <aacid at kde.org>
 // Copyright (C) 2019 Christian Persch <chpe at src.gnome.org>
 //
 // To see a description of the changes please see the Changelog file that
@@ -23,10 +23,7 @@
 #include <config.h>
 
 #include <cstdio>
-// TODO remove here and below once we depend on a new enough gcc in our CI
-#if __has_include(<filesystem>)
-#    include <filesystem>
-#else
+#ifdef HAVE_UNISTD_H
 #    include <unistd.h>
 #endif
 #include "goo/gmem.h"
@@ -80,15 +77,8 @@ SplashFontSrc::~SplashFontSrc()
 {
     if (deleteSrc) {
         if (isFile) {
-            if (fileName) {
-#if __has_include(<filesystem>)
-                // We don't care about any error, but we don't want it to throw
-                std::error_code error_code;
-                std::filesystem::remove(fileName->c_str(), error_code);
-#else
+            if (fileName)
                 unlink(fileName->c_str());
-#endif
-            }
         } else {
             if (buf)
                 gfree(buf);


More information about the poppler mailing list