summaryrefslogtreecommitdiff
path: root/fofi
diff options
context:
space:
mode:
authorAlbert Astals Cid <aacid@kde.org>2018-09-23 13:41:59 +0200
committerAlbert Astals Cid <aacid@kde.org>2018-09-23 13:41:59 +0200
commit45c8888dcaf3da7981abc045835efd01a24e9e00 (patch)
treef1105b08630eca34f11c1e6f5326a45d9573da10 /fofi
parent5c54abedbc15d373109b23bf61c4e229d9c0cd9f (diff)
FoFiType1: Some more const
Diffstat (limited to 'fofi')
-rw-r--r--fofi/FoFiType1.cc10
-rw-r--r--fofi/FoFiType1.h10
2 files changed, 10 insertions, 10 deletions
diff --git a/fofi/FoFiType1.cc b/fofi/FoFiType1.cc
index 889ea111..62d10c8c 100644
--- a/fofi/FoFiType1.cc
+++ b/fofi/FoFiType1.cc
@@ -45,7 +45,7 @@
// FoFiType1
//------------------------------------------------------------------------
-FoFiType1 *FoFiType1::make(char *fileA, int lenA) {
+FoFiType1 *FoFiType1::make(const char *fileA, int lenA) {
return new FoFiType1(fileA, lenA, gFalse);
}
@@ -59,7 +59,7 @@ FoFiType1 *FoFiType1::load(const char *fileName) {
return new FoFiType1(fileA, lenA, gTrue);
}
-FoFiType1::FoFiType1(char *fileA, int lenA, GBool freeFileDataA):
+FoFiType1::FoFiType1(const char *fileA, int lenA, GBool freeFileDataA):
FoFiBase(fileA, lenA, freeFileDataA)
{
name = nullptr;
@@ -88,7 +88,7 @@ FoFiType1::~FoFiType1() {
}
}
-char *FoFiType1::getName() {
+const char *FoFiType1::getName() {
if (!parsed) {
parse();
}
@@ -114,7 +114,7 @@ void FoFiType1::getFontMatrix(double *mat) {
}
void FoFiType1::writeEncoded(const char **newEncoding,
- FoFiOutputFunc outputFunc, void *outputStream) {
+ FoFiOutputFunc outputFunc, void *outputStream) const {
char buf[512];
char *line, *line2, *p;
int i;
@@ -196,7 +196,7 @@ void FoFiType1::writeEncoded(const char **newEncoding,
}
}
-char *FoFiType1::getNextLine(char *line) {
+char *FoFiType1::getNextLine(char *line) const {
while (line < (char *)file + len && *line != '\x0a' && *line != '\x0d') {
++line;
}
diff --git a/fofi/FoFiType1.h b/fofi/FoFiType1.h
index 167a5e43..f8a92cab 100644
--- a/fofi/FoFiType1.h
+++ b/fofi/FoFiType1.h
@@ -38,7 +38,7 @@ class FoFiType1: public FoFiBase {
public:
// Create a FoFiType1 object from a memory buffer.
- static FoFiType1 *make(char *fileA, int lenA);
+ static FoFiType1 *make(const char *fileA, int lenA);
// Create a FoFiType1 object from a file on disk.
static FoFiType1 *load(const char *fileName);
@@ -46,7 +46,7 @@ public:
~FoFiType1();
// Return the font name.
- char *getName();
+ const char *getName();
// Return the encoding, as an array of 256 names (any of which may
// be NULL).
@@ -57,13 +57,13 @@ public:
// Write a version of the Type 1 font file with a new encoding.
void writeEncoded(const char **newEncoding,
- FoFiOutputFunc outputFunc, void *outputStream);
+ FoFiOutputFunc outputFunc, void *outputStream) const;
private:
- FoFiType1(char *fileA, int lenA, GBool freeFileDataA);
+ FoFiType1(const char *fileA, int lenA, GBool freeFileDataA);
- char *getNextLine(char *line);
+ char *getNextLine(char *line) const;
void parse();
void undoPFB();