summaryrefslogtreecommitdiff
path: root/splash
diff options
context:
space:
mode:
authorOliver Sander <oliver.sander@tu-dresden.de>2018-11-30 22:20:01 +0100
committerAlbert Astals Cid <tsdgeos@yahoo.es>2019-03-21 22:28:12 +0000
commit3bf47e100717f4295652d578ecd12e489937b329 (patch)
tree38f6043ffc4dada7ef0e51126906375c24a03386 /splash
parent5610fc71fcd6b4c54e805470259ed95547aa2328 (diff)
Make GooList a template type
One more step towards getting rid of it completely.
Diffstat (limited to 'splash')
-rw-r--r--splash/Splash.cc2
-rw-r--r--splash/SplashBitmap.cc8
-rw-r--r--splash/SplashBitmap.h6
3 files changed, 8 insertions, 8 deletions
diff --git a/splash/Splash.cc b/splash/Splash.cc
index bc718190..86b4fcda 100644
--- a/splash/Splash.cc
+++ b/splash/Splash.cc
@@ -5285,7 +5285,7 @@ SplashError Splash::composite(SplashBitmap *src, int xSrc, int ySrc,
if(src->getSeparationList()->size() > bitmap->getSeparationList()->size()) {
for (x = bitmap->getSeparationList()->size(); x < (int)src->getSeparationList()->size(); x++)
- bitmap->getSeparationList()->push_back(((GfxSeparationColorSpace *)src->getSeparationList()->get(x))->copy());
+ bitmap->getSeparationList()->push_back((GfxSeparationColorSpace *)((GfxSeparationColorSpace *)src->getSeparationList()->get(x))->copy());
}
if (src->alpha) {
pipeInit(&pipe, xDest, yDest, nullptr, pixel,
diff --git a/splash/SplashBitmap.cc b/splash/SplashBitmap.cc
index ada32728..8b260a06 100644
--- a/splash/SplashBitmap.cc
+++ b/splash/SplashBitmap.cc
@@ -54,7 +54,7 @@
SplashBitmap::SplashBitmap(int widthA, int heightA, int rowPadA,
SplashColorMode modeA, bool alphaA,
- bool topDown, GooList *separationListA) {
+ bool topDown, GooList<GfxSeparationColorSpace*> *separationListA) {
width = widthA;
height = heightA;
mode = modeA;
@@ -124,10 +124,10 @@ SplashBitmap::SplashBitmap(int widthA, int heightA, int rowPadA,
} else {
alpha = nullptr;
}
- separationList = new GooList();
+ separationList = new GooList<GfxSeparationColorSpace*>();
if (separationListA != nullptr)
for (std::size_t i = 0; i < separationListA->size(); i++)
- separationList->push_back(((GfxSeparationColorSpace *) separationListA->get(i))->copy());
+ separationList->push_back((GfxSeparationColorSpace*)((GfxSeparationColorSpace *) separationListA->get(i))->copy());
}
SplashBitmap *SplashBitmap::copy(SplashBitmap *src) {
@@ -159,7 +159,7 @@ SplashBitmap::~SplashBitmap() {
}
}
gfree(alpha);
- deleteGooList<GfxSeparationColorSpace>(separationList);
+ deleteGooList<GfxSeparationColorSpace*>(separationList);
}
diff --git a/splash/SplashBitmap.h b/splash/SplashBitmap.h
index b824e638..4ad9b628 100644
--- a/splash/SplashBitmap.h
+++ b/splash/SplashBitmap.h
@@ -51,7 +51,7 @@ public:
// upside-down, i.e., with the last row first in memory.
SplashBitmap(int widthA, int heightA, int rowPad,
SplashColorMode modeA, bool alphaA,
- bool topDown = true, GooList *separationList = nullptr);
+ bool topDown = true, GooList<GfxSeparationColorSpace*> *separationList = nullptr);
static SplashBitmap *copy(SplashBitmap *src);
~SplashBitmap();
@@ -67,7 +67,7 @@ public:
SplashColorMode getMode() { return mode; }
SplashColorPtr getDataPtr() { return data; }
unsigned char *getAlphaPtr() { return alpha; }
- GooList *getSeparationList() { return separationList; }
+ GooList<GfxSeparationColorSpace*> *getSeparationList() { return separationList; }
SplashError writePNMFile(char *fileName);
SplashError writePNMFile(FILE *f);
@@ -117,7 +117,7 @@ private:
SplashColorPtr data; // pointer to row zero of the color data
unsigned char *alpha; // pointer to row zero of the alpha data
// (always top-down)
- GooList *separationList; // list of spot colorants and their mapping functions
+ GooList<GfxSeparationColorSpace*> *separationList; // list of spot colorants and their mapping functions
friend class Splash;