[poppler] poppler/CharCodeToUnicode.cc poppler/Decrypt.cc poppler/NameToUnicodeTable.h poppler/PSOutputDev.cc poppler/TextOutputDev.cc

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Tue Jan 7 16:48:26 UTC 2020


 poppler/CharCodeToUnicode.cc |    4 ++--
 poppler/Decrypt.cc           |    4 ++--
 poppler/NameToUnicodeTable.h |    6 +++---
 poppler/PSOutputDev.cc       |    2 +-
 poppler/TextOutputDev.cc     |    2 +-
 5 files changed, 9 insertions(+), 9 deletions(-)

New commits:
commit d2617256819eac077a9537a1c8dbbb44661d6f62
Author: Albert Astals Cid <aacid at kde.org>
Date:   Tue Jan 7 17:44:32 2020 +0100

    Mark some static arrays as const

diff --git a/poppler/CharCodeToUnicode.cc b/poppler/CharCodeToUnicode.cc
index 20455bab..f5208926 100644
--- a/poppler/CharCodeToUnicode.cc
+++ b/poppler/CharCodeToUnicode.cc
@@ -13,7 +13,7 @@
 // All changes made under the Poppler project to this file are licensed
 // under GPL version 2 or later
 //
-// Copyright (C) 2006, 2008-2010, 2012, 2018, 2019 Albert Astals Cid <aacid at kde.org>
+// Copyright (C) 2006, 2008-2010, 2012, 2018-2020 Albert Astals Cid <aacid at kde.org>
 // Copyright (C) 2007 Julien Rebetez <julienr at svn.gnome.org>
 // Copyright (C) 2007 Koji Otani <sho at bbr.jp>
 // Copyright (C) 2008 Michael Vrable <mvrable at cs.ucsd.edu>
@@ -79,7 +79,7 @@ static int getCharFromFile(void *data) {
 
 //------------------------------------------------------------------------
 
-static int hexCharVals[256] = {
+static const int hexCharVals[256] = {
   -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, // 0x
   -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, // 1x
   -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, // 2x
diff --git a/poppler/Decrypt.cc b/poppler/Decrypt.cc
index 8e06ecc6..5f29351e 100644
--- a/poppler/Decrypt.cc
+++ b/poppler/Decrypt.cc
@@ -14,7 +14,7 @@
 // under GPL version 2 or later
 //
 // Copyright (C) 2008 Julien Rebetez <julien at fhtagn.net>
-// Copyright (C) 2008, 2010, 2016-2019 Albert Astals Cid <aacid at kde.org>
+// Copyright (C) 2008, 2010, 2016-2020 Albert Astals Cid <aacid at kde.org>
 // Copyright (C) 2009 Matthias Franz <matthias at ktug.or.kr>
 // Copyright (C) 2009 David Benjamin <davidben at mit.edu>
 // Copyright (C) 2012 Fabio D'Urso <fabiodurso at hotmail.it>
@@ -1403,7 +1403,7 @@ void md5(const unsigned char *msg, int msgLen, unsigned char *digest) {
 // SHA-256 hash
 //------------------------------------------------------------------------
 
-static unsigned int sha256K[64] = {
+static const unsigned int sha256K[64] = {
   0x428a2f98, 0x71374491, 0xb5c0fbcf, 0xe9b5dba5,
   0x3956c25b, 0x59f111f1, 0x923f82a4, 0xab1c5ed5,
   0xd807aa98, 0x12835b01, 0x243185be, 0x550c7dc3,
diff --git a/poppler/NameToUnicodeTable.h b/poppler/NameToUnicodeTable.h
index a1b64113..929667e3 100644
--- a/poppler/NameToUnicodeTable.h
+++ b/poppler/NameToUnicodeTable.h
@@ -13,7 +13,7 @@
 // All changes made under the Poppler project to this file are licensed
 // under GPL version 2 or later
 //
-// Copyright (C) 2011, 2012 Albert Astals Cid <aacid at kde.org>
+// Copyright (C) 2011, 2012, 2020 Albert Astals Cid <aacid at kde.org>
 // Copyright (C) 2013 Jason Crain <jason at aquaticape.us>
 //
 // To see a description of the changes please see the Changelog file that
@@ -31,7 +31,7 @@ struct NameToUnicodeTab {
 };
 
 // map character names to Unicode
-static struct NameToUnicodeTab nameToUnicodeTextTab[] = {
+static const struct NameToUnicodeTab nameToUnicodeTextTab[] = {
   {0x0021, "!"},
   {0x0023, "#"},
   {0x0024, "$"},
@@ -4278,7 +4278,7 @@ static struct NameToUnicodeTab nameToUnicodeTextTab[] = {
 };
 
 // map ZapfDingbats names to Unicode
-static struct NameToUnicodeTab nameToUnicodeZapfDingbatsTab[] = {
+static const struct NameToUnicodeTab nameToUnicodeZapfDingbatsTab[] = {
   {0x275e, "a100"},
   {0x2761, "a101"},
   {0x2762, "a102"},
diff --git a/poppler/PSOutputDev.cc b/poppler/PSOutputDev.cc
index 42c68171..8ad72c36 100644
--- a/poppler/PSOutputDev.cc
+++ b/poppler/PSOutputDev.cc
@@ -883,7 +883,7 @@ struct PSSubstFont {
 };
 
 // NB: must be in same order as base14SubstFonts in GfxFont.cc
-static PSSubstFont psBase14SubstFonts[14] = {
+static const PSSubstFont psBase14SubstFonts[14] = {
   {"Courier",               0.600},
   {"Courier-Oblique",       0.600},
   {"Courier-Bold",          0.600},
diff --git a/poppler/TextOutputDev.cc b/poppler/TextOutputDev.cc
index 1d8b49aa..c7c8f852 100644
--- a/poppler/TextOutputDev.cc
+++ b/poppler/TextOutputDev.cc
@@ -559,7 +559,7 @@ struct CombiningTable {
   Unicode comb;
 };
 
-static struct CombiningTable combiningTable[] = {
+static const struct CombiningTable combiningTable[] = {
   {0x0060, 0x0300}, // grave
   {0x00a8, 0x0308}, // dieresis
   {0x00af, 0x0304}, // macron


More information about the poppler mailing list