Commit d248d3e5 authored by Oliver Sander's avatar Oliver Sander Committed by Albert Astals Cid

Make a few pointer arguments const

This increases code legibility, if nothing else.
parent 1243d282
......@@ -58,7 +58,7 @@ static int glyphPathCubicTo(const FT_Vector *ctrl1, const FT_Vector *ctrl2,
//------------------------------------------------------------------------
SplashFTFont::SplashFTFont(SplashFTFontFile *fontFileA, SplashCoord *matA,
SplashCoord *textMatA):
const SplashCoord *textMatA):
SplashFont(fontFileA, matA, textMatA, fontFileA->engine->aa),
textScale(0),
enableFreeTypeHinting(fontFileA->engine->enableFreeTypeHinting),
......
......@@ -44,7 +44,7 @@ class SplashFTFont: public SplashFont {
public:
SplashFTFont(SplashFTFontFile *fontFileA, SplashCoord *matA,
SplashCoord *textMatA);
const SplashCoord *textMatA);
virtual ~SplashFTFont();
......
......@@ -137,7 +137,7 @@ SplashFTFontFile::~SplashFTFontFile() {
}
SplashFont *SplashFTFontFile::makeFont(SplashCoord *mat,
SplashCoord *textMat) {
const SplashCoord *textMat) {
SplashFont *font;
font = new SplashFTFont(this, mat, textMat);
......
......@@ -60,7 +60,7 @@ public:
// Create a new SplashFTFont, i.e., a scaled instance of this font
// file.
SplashFont *makeFont(SplashCoord *mat,
SplashCoord *textMat) override;
const SplashCoord *textMat) override;
// Provide access to the code-to-GID map
int* getCodeToGID();
......
......@@ -46,7 +46,7 @@ struct SplashFontCacheTag {
//------------------------------------------------------------------------
SplashFont::SplashFont(SplashFontFile *fontFileA, SplashCoord *matA,
SplashCoord *textMatA, GBool aaA) {
const SplashCoord *textMatA, GBool aaA) {
fontFile = fontFileA;
fontFile->incRefCnt();
mat[0] = matA[0];
......
......@@ -51,7 +51,7 @@ class SplashFont {
public:
SplashFont(SplashFontFile *fontFileA, SplashCoord *matA,
SplashCoord *textMatA, GBool aaA);
const SplashCoord *textMatA, GBool aaA);
// This must be called after the constructor, so that the subclass
// constructor has a chance to compute the bbox.
......@@ -66,7 +66,7 @@ public:
// Return true if <this> matches the specified font file and matrix.
GBool matches(SplashFontFile *fontFileA, SplashCoord *matA,
SplashCoord *textMatA) {
const SplashCoord *textMatA) {
return fontFileA == fontFile &&
matA[0] == mat[0] && matA[1] == mat[1] &&
matA[2] == mat[2] && matA[3] == mat[3] &&
......
......@@ -240,8 +240,8 @@ void SplashFontEngine::setAA(GBool aa) {
}
SplashFont *SplashFontEngine::getFont(SplashFontFile *fontFile,
SplashCoord *textMat,
SplashCoord *ctm) {
const SplashCoord *textMat,
const SplashCoord *ctm) {
SplashCoord mat[4];
SplashFont *font;
int i, j;
......
......@@ -88,7 +88,7 @@ public:
// [x' y'] = [x y] * mat
// Note that the Splash y axis points downward.
SplashFont *getFont(SplashFontFile *fontFile,
SplashCoord *textMat, SplashCoord *ctm);
const SplashCoord *textMat, const SplashCoord *ctm);
GBool getAA();
void setAA(GBool aa);
......
......@@ -73,7 +73,7 @@ public:
// Create a new SplashFont, i.e., a scaled instance of this font
// file.
virtual SplashFont *makeFont(SplashCoord *mat, SplashCoord *textMat) = 0;
virtual SplashFont *makeFont(SplashCoord *mat, const SplashCoord *textMat) = 0;
// Get the font file ID.
SplashFontFileID *getID() { return id; }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment