glib/poppler-document.cc | 8 ++++---- poppler/FontInfo.cc | 2 +- poppler/FontInfo.h | 24 ++++++++++++------------ 3 files changed, 17 insertions(+), 17 deletions(-)
New commits: commit 8eb7a123c2ad226598de498cc37fa9b8dccdd3bd Author: Albert Astals Cid <[email protected]> Date: Wed Nov 27 17:10:52 2019 +0100 FontInfo: Add some const diff --git a/glib/poppler-document.cc b/glib/poppler-document.cc index 5b00e64f..e9c27796 100644 --- a/glib/poppler-document.cc +++ b/glib/poppler-document.cc @@ -2738,7 +2738,7 @@ POPPLER_DEFINE_BOXED_TYPE (PopplerFontsIter, poppler_fonts_iter, const char * poppler_fonts_iter_get_full_name (PopplerFontsIter *iter) { - GooString *name; + const GooString *name; FontInfo *info; info = iter->items[iter->index]; @@ -2793,7 +2793,7 @@ poppler_fonts_iter_get_name (PopplerFontsIter *iter) const char * poppler_fonts_iter_get_substitute_name (PopplerFontsIter *iter) { - GooString *name; + const GooString *name; FontInfo *info; info = iter->items[iter->index]; @@ -2818,7 +2818,7 @@ poppler_fonts_iter_get_substitute_name (PopplerFontsIter *iter) const char * poppler_fonts_iter_get_file_name (PopplerFontsIter *iter) { - GooString *file; + const GooString *file; FontInfo *info; info = iter->items[iter->index]; @@ -2864,7 +2864,7 @@ poppler_fonts_iter_get_font_type (PopplerFontsIter *iter) const char * poppler_fonts_iter_get_encoding (PopplerFontsIter *iter) { - GooString *encoding; + const GooString *encoding; FontInfo *info; info = iter->items[iter->index]; diff --git a/poppler/FontInfo.cc b/poppler/FontInfo.cc index 87c212ee..88f7b059 100644 --- a/poppler/FontInfo.cc +++ b/poppler/FontInfo.cc @@ -214,7 +214,7 @@ FontInfo::FontInfo(GfxFont *font, XRef *xref) { } } -FontInfo::FontInfo(FontInfo& f) { +FontInfo::FontInfo(const FontInfo& f) { name = f.name ? f.name->copy() : nullptr; file = f.file ? f.file->copy() : nullptr; encoding = f.encoding ? f.encoding->copy() : nullptr; diff --git a/poppler/FontInfo.h b/poppler/FontInfo.h index 0ecef820..ca8be3d9 100644 --- a/poppler/FontInfo.h +++ b/poppler/FontInfo.h @@ -3,7 +3,7 @@ // FontInfo.h // // Copyright (C) 2005 Kristian Høgsberg <[email protected]> -// Copyright (C) 2005-2008, 2010, 2011, 2018 Albert Astals Cid <[email protected]> +// Copyright (C) 2005-2008, 2010, 2011, 2018, 2019 Albert Astals Cid <[email protected]> // Copyright (C) 2005 Brad Hards <[email protected]> // Copyright (C) 2009 Pino Toscano <[email protected]> // Copyright (C) 2012 Adrian Johnson <[email protected]> @@ -54,22 +54,22 @@ public: // Constructor. FontInfo(GfxFont *fontA, XRef *xrefA); // Copy constructor - FontInfo(FontInfo& f); + FontInfo(const FontInfo& f); // Destructor. ~FontInfo(); FontInfo& operator=(const FontInfo &) = delete; - GooString *getName() { return name; }; - GooString *getSubstituteName() { return substituteName; }; - GooString *getFile() { return file; }; - GooString *getEncoding() { return encoding; }; - Type getType() { return type; }; - bool getEmbedded() { return emb; }; - bool getSubset() { return subset; }; - bool getToUnicode() { return hasToUnicode; }; - Ref getRef() { return fontRef; }; - Ref getEmbRef() { return embRef; }; + const GooString *getName() const { return name; }; + const GooString *getSubstituteName() const { return substituteName; }; + const GooString *getFile() const { return file; }; + const GooString *getEncoding() const { return encoding; }; + Type getType() const { return type; }; + bool getEmbedded() const { return emb; }; + bool getSubset() const { return subset; }; + bool getToUnicode() const { return hasToUnicode; }; + Ref getRef() const { return fontRef; }; + Ref getEmbRef() const { return embRef; }; private: GooString *name; _______________________________________________ poppler mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/poppler
