[poppler] poppler/GlobalParamsWin.cc
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Thu May 4 22:26:59 UTC 2023
poppler/GlobalParamsWin.cc | 11 +++--------
1 file changed, 3 insertions(+), 8 deletions(-)
New commits:
commit 47856547b9b56c037049e48453f9ae65aa266a26
Author: Albert Astals Cid <aacid at kde.org>
Date: Fri May 5 00:22:18 2023 +0200
GooString -> std::string
diff --git a/poppler/GlobalParamsWin.cc b/poppler/GlobalParamsWin.cc
index d862775e..2e676bc2 100644
--- a/poppler/GlobalParamsWin.cc
+++ b/poppler/GlobalParamsWin.cc
@@ -336,9 +336,6 @@ static GooString *replaceSuffix(GooString *path, const char *suffixA, const char
void GlobalParams::setupBaseFonts(const char *dir)
{
- const char *dataRoot = popplerDataDir ? popplerDataDir : POPPLER_DATADIR;
- GooString *fileName = nullptr;
-
if (baseFontsInitialized)
return;
baseFontsInitialized = true;
@@ -375,11 +372,11 @@ void GlobalParams::setupBaseFonts(const char *dir)
sysFonts->scanWindowsFonts(winFontDir);
}
- fileName = new GooString(dataRoot);
- fileName->append("/cidfmap");
+ const char *dataRoot = popplerDataDir ? popplerDataDir : POPPLER_DATADIR;
+ const std::string fileName = std::string(dataRoot).append("/cidfmap");
// try to open file
- const std::unique_ptr<GooFile> file = GooFile::open(fileName->toStr());
+ const std::unique_ptr<GooFile> file = GooFile::open(fileName);
if (file) {
Parser *parser;
@@ -405,8 +402,6 @@ void GlobalParams::setupBaseFonts(const char *dir)
}
}
delete parser;
- } else {
- delete fileName;
}
}
More information about the poppler
mailing list