From 170a36e41921ed11699b230205d6e269f5f62806 Mon Sep 17 00:00:00 2001 From: Oliver Sander Date: Fri, 31 Dec 2021 11:21:43 +0100 Subject: Make a few GooString* arguments const --- poppler/PSOutputDev.cc | 6 +++--- poppler/PSOutputDev.h | 6 +++--- splash/SplashFontFile.cc | 2 +- splash/SplashFontFile.h | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/poppler/PSOutputDev.cc b/poppler/PSOutputDev.cc index 140bde80..6c58daa3 100644 --- a/poppler/PSOutputDev.cc +++ b/poppler/PSOutputDev.cc @@ -2295,7 +2295,7 @@ err1: strObj.streamClose(); } -void PSOutputDev::setupExternalType1Font(GooString *fileName, GooString *psName) +void PSOutputDev::setupExternalType1Font(const GooString *fileName, GooString *psName) { static const char hexChar[17] = "0123456789abcdef"; FILE *fontFile; @@ -2485,7 +2485,7 @@ void PSOutputDev::setupEmbeddedTrueTypeFont(GfxFont *font, Ref *id, GooString *p writePS("%%EndResource\n"); } -void PSOutputDev::setupExternalTrueTypeFont(GfxFont *font, GooString *fileName, GooString *psName) +void PSOutputDev::setupExternalTrueTypeFont(GfxFont *font, const GooString *fileName, GooString *psName) { FoFiTrueType *ffTT; int *codeToGID; @@ -2526,7 +2526,7 @@ void PSOutputDev::updateFontMaxValidGlyph(GfxFont *font, int maxValidGlyph) } } -void PSOutputDev::setupExternalCIDTrueTypeFont(GfxFont *font, GooString *fileName, GooString *psName, bool needVerticalMetrics) +void PSOutputDev::setupExternalCIDTrueTypeFont(GfxFont *font, const GooString *fileName, GooString *psName, bool needVerticalMetrics) { FoFiTrueType *ffTT; int *codeToGID; diff --git a/poppler/PSOutputDev.h b/poppler/PSOutputDev.h index ac49fe77..76a73ce4 100644 --- a/poppler/PSOutputDev.h +++ b/poppler/PSOutputDev.h @@ -369,14 +369,14 @@ private: void setupFont(GfxFont *font, Dict *parentResDict); void setupEmbeddedType1Font(Ref *id, GooString *psName); void updateFontMaxValidGlyph(GfxFont *font, int maxValidGlyph); - void setupExternalType1Font(GooString *fileName, GooString *psName); + void setupExternalType1Font(const GooString *fileName, GooString *psName); void setupEmbeddedType1CFont(GfxFont *font, Ref *id, GooString *psName); void setupEmbeddedOpenTypeT1CFont(GfxFont *font, Ref *id, GooString *psName); void setupEmbeddedTrueTypeFont(GfxFont *font, Ref *id, GooString *psName); - void setupExternalTrueTypeFont(GfxFont *font, GooString *fileName, GooString *psName); + void setupExternalTrueTypeFont(GfxFont *font, const GooString *fileName, GooString *psName); void setupEmbeddedCIDType0Font(GfxFont *font, Ref *id, GooString *psName); void setupEmbeddedCIDTrueTypeFont(GfxFont *font, Ref *id, GooString *psName, bool needVerticalMetrics); - void setupExternalCIDTrueTypeFont(GfxFont *font, GooString *fileName, GooString *psName, bool needVerticalMetrics); + void setupExternalCIDTrueTypeFont(GfxFont *font, const GooString *fileName, GooString *psName, bool needVerticalMetrics); void setupEmbeddedOpenTypeCFFFont(GfxFont *font, Ref *id, GooString *psName); void setupType3Font(GfxFont *font, GooString *psName, Dict *parentResDict); GooString *makePSFontName(GfxFont *font, const Ref *id); diff --git a/splash/SplashFontFile.cc b/splash/SplashFontFile.cc index c0efd422..e6e241c2 100644 --- a/splash/SplashFontFile.cc +++ b/splash/SplashFontFile.cc @@ -110,7 +110,7 @@ void SplashFontSrc::unref() delete this; } -void SplashFontSrc::setFile(GooString *file, bool del) +void SplashFontSrc::setFile(const GooString *file, bool del) { isFile = true; fileName = file->copy(); diff --git a/splash/SplashFontFile.h b/splash/SplashFontFile.h index 539bd307..2f7b49d2 100644 --- a/splash/SplashFontFile.h +++ b/splash/SplashFontFile.h @@ -42,7 +42,7 @@ public: SplashFontSrc(const SplashFontSrc &) = delete; SplashFontSrc &operator=(const SplashFontSrc &) = delete; - void setFile(GooString *file, bool del); + void setFile(const GooString *file, bool del); void setFile(const char *file, bool del); void setBuf(char *bufA, int buflenA, bool del); -- cgit v1.2.3