summaryrefslogtreecommitdiff
path: root/fofi
diff options
context:
space:
mode:
authorAlbert Astals Cid <aacid@kde.org>2019-09-27 18:03:30 +0200
committerAlbert Astals Cid <aacid@kde.org>2019-09-27 22:08:28 +0200
commit120cfc0de67501988edc9ded58d2a534d0b5a70e (patch)
treebf7c7428279f9ba525bae21db535de260ab34bc0 /fofi
parentcec2397fc0542516cac16615f63ab89032806a2e (diff)
Add some const
Suggested by clang-tidy readability-non-const-parameter check
Diffstat (limited to 'fofi')
-rw-r--r--fofi/FoFiTrueType.cc4
-rw-r--r--fofi/FoFiTrueType.h4
-rw-r--r--fofi/FoFiType1C.cc4
-rw-r--r--fofi/FoFiType1C.h4
4 files changed, 8 insertions, 8 deletions
diff --git a/fofi/FoFiTrueType.cc b/fofi/FoFiTrueType.cc
index c9c353c6..8213c1d1 100644
--- a/fofi/FoFiTrueType.cc
+++ b/fofi/FoFiTrueType.cc
@@ -572,7 +572,7 @@ void FoFiTrueType::convertToType1(const char *psName, const char **newEncoding,
}
void FoFiTrueType::convertToCIDType2(const char *psName,
- int *cidMap, int nCIDs,
+ const int *cidMap, int nCIDs,
bool needVerticalMetrics,
FoFiOutputFunc outputFunc,
void *outputStream) const {
@@ -880,7 +880,7 @@ void FoFiTrueType::cvtEncoding(char **encoding,
}
void FoFiTrueType::cvtCharStrings(char **encoding,
- int *codeToGID,
+ const int *codeToGID,
FoFiOutputFunc outputFunc,
void *outputStream) const {
const char *name;
diff --git a/fofi/FoFiTrueType.h b/fofi/FoFiTrueType.h
index ee35e4f3..7ef0cabf 100644
--- a/fofi/FoFiTrueType.h
+++ b/fofi/FoFiTrueType.h
@@ -125,7 +125,7 @@ public:
// name (so we don't need to depend on the 'name' table in the
// font). The <cidMap> array maps CIDs to GIDs; it has <nCIDs>
// entries. (Not useful for OpenType CFF fonts.)
- void convertToCIDType2(const char *psName, int *cidMap, int nCIDs,
+ void convertToCIDType2(const char *psName, const int *cidMap, int nCIDs,
bool needVerticalMetrics,
FoFiOutputFunc outputFunc, void *outputStream) const;
@@ -169,7 +169,7 @@ private:
FoFiOutputFunc outputFunc,
void *outputStream) const;
void cvtCharStrings(char **encoding,
- int *codeToGID,
+ const int *codeToGID,
FoFiOutputFunc outputFunc,
void *outputStream) const;
void cvtSfnts(FoFiOutputFunc outputFunc,
diff --git a/fofi/FoFiType1C.cc b/fofi/FoFiType1C.cc
index 522b86a6..96b0586f 100644
--- a/fofi/FoFiType1C.cc
+++ b/fofi/FoFiType1C.cc
@@ -489,7 +489,7 @@ void FoFiType1C::convertToType1(const char *psName, const char **newEncoding, bo
(*outputFunc)(outputStream, "cleartomark\n", 12);
}
-void FoFiType1C::convertToCIDType0(const char *psName, int *codeMap, int nCodes,
+void FoFiType1C::convertToCIDType0(const char *psName, const int *codeMap, int nCodes,
FoFiOutputFunc outputFunc,
void *outputStream) {
int *cidMap;
@@ -834,7 +834,7 @@ void FoFiType1C::convertToCIDType0(const char *psName, int *codeMap, int nCodes,
gfree(cidMap);
}
-void FoFiType1C::convertToType0(const char *psName, int *codeMap, int nCodes,
+void FoFiType1C::convertToType0(const char *psName, const int *codeMap, int nCodes,
FoFiOutputFunc outputFunc,
void *outputStream) {
int *cidMap;
diff --git a/fofi/FoFiType1C.h b/fofi/FoFiType1C.h
index 920abdd6..a1f8edcc 100644
--- a/fofi/FoFiType1C.h
+++ b/fofi/FoFiType1C.h
@@ -186,7 +186,7 @@ public:
// font's internal CID-to-GID mapping is used
// (3) is <codeMap> is NULL and this is an 8-bit CFF font, then
// the identity CID-to-GID mapping is used
- void convertToCIDType0(const char *psName, int *codeMap, int nCodes,
+ void convertToCIDType0(const char *psName, const int *codeMap, int nCodes,
FoFiOutputFunc outputFunc, void *outputStream);
// Convert to a Type 0 (but non-CID) composite font, suitable for
@@ -198,7 +198,7 @@ public:
// font's internal CID-to-GID mapping is used
// (3) is <codeMap> is NULL and this is an 8-bit CFF font, then
// the identity CID-to-GID mapping is used
- void convertToType0(const char *psName, int *codeMap, int nCodes,
+ void convertToType0(const char *psName, const int *codeMap, int nCodes,
FoFiOutputFunc outputFunc, void *outputStream);
private: