diff options
author | Oliver Sander <oliver.sander@tu-dresden.de> | 2021-12-31 11:29:16 +0100 |
---|---|---|
committer | Albert Astals Cid <tsdgeos@yahoo.es> | 2022-01-05 13:45:07 +0000 |
commit | 4d3c2cb33bb0b71697fee27fc0ed6da4ba81bb53 (patch) | |
tree | d825e2b901143c8f8a48b8d3cacec4a57424100b | |
parent | 953c9c762f346236d856327833f3a550b993138a (diff) |
Remove a bit of duplicate code
-rw-r--r-- | poppler/GfxFont.cc | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/poppler/GfxFont.cc b/poppler/GfxFont.cc index e99985d4..0c04cae4 100644 --- a/poppler/GfxFont.cc +++ b/poppler/GfxFont.cc @@ -726,20 +726,16 @@ std::optional<GfxFontLoc> GfxFont::locateFont(XRef *xref, PSOutputDev *ps) return std::move(fontLoc); // std::move only required to please g++-7 } } else { + GfxFontLoc fontLoc; + fontLoc.setPath(path); + fontLoc.locType = gfxFontLocExternal; if (sysFontType == sysFontTTF || sysFontType == sysFontTTC) { - GfxFontLoc fontLoc; - fontLoc.locType = gfxFontLocExternal; fontLoc.fontType = fontTrueType; - fontLoc.setPath(path); - return std::move(fontLoc); // std::move only required to please g++-7 } else if (sysFontType == sysFontPFA || sysFontType == sysFontPFB) { - GfxFontLoc fontLoc; - fontLoc.locType = gfxFontLocExternal; fontLoc.fontType = fontType1; - fontLoc.setPath(path); fontLoc.fontNum = fontNum; - return std::move(fontLoc); // std::move only required to please g++-7 } + return std::move(fontLoc); // std::move only required to please g++-7 } delete path; } |