summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilipp Knechtges <philipp-dev@knechtges.com>2020-05-17 09:11:01 +0200
committerAlbert Astals Cid <tsdgeos@yahoo.es>2020-05-21 09:00:29 +0000
commit2334bea5208d0506e4eee02ed170abd7e73e2fe4 (patch)
treef80d1955681e1b2d6107b2836aed93aff689928f
parent1f698b44564b0313c019557616866eae11bf2cc9 (diff)
make the clang/clazy/Ubuntu/Android pipelines happy
-rw-r--r--poppler/GfxState.cc20
-rw-r--r--poppler/GfxState.h2
-rw-r--r--poppler/PSOutputDev.cc2
3 files changed, 12 insertions, 12 deletions
diff --git a/poppler/GfxState.cc b/poppler/GfxState.cc
index f5f11c13..339614b2 100644
--- a/poppler/GfxState.cc
+++ b/poppler/GfxState.cc
@@ -203,7 +203,7 @@ GfxColorTransform::GfxColorTransform(void *sourceProfileA, void *transformA, int
cmsIntent = cmsIntentA;
inputPixelType = inputPixelTypeA;
transformPixelType = transformPixelTypeA;
- psCSA = NULL;
+ psCSA = nullptr;
}
GfxColorTransform::~GfxColorTransform() {
@@ -229,15 +229,15 @@ char *GfxColorTransform::getPostScriptCSA()
if (psCSA)
return psCSA;
- if (sourceProfile == NULL) {
- error(errSyntaxWarning, -1, "profile is NULL");
- return NULL;
+ if (sourceProfile == nullptr) {
+ error(errSyntaxWarning, -1, "profile is nullptr");
+ return nullptr;
}
- size = cmsGetPostScriptCSA(cmsGetProfileContextID(sourceProfile), sourceProfile, cmsIntent, 0, NULL, 0);
+ size = cmsGetPostScriptCSA(cmsGetProfileContextID(sourceProfile), sourceProfile, cmsIntent, 0, nullptr, 0);
if (size == 0) {
- error(errSyntaxWarning, -1, "PostScript CSA is NULL");
- return NULL;
+ error(errSyntaxWarning, -1, "PostScript CSA is nullptr");
+ return nullptr;
}
psCSA = (char*)gmalloc(size+1);
@@ -1809,9 +1809,9 @@ GfxColorSpace *GfxICCBasedColorSpace::parse(Array *arr, OutputDev *out, GfxState
error(errSyntaxError, -1, "Bad ICCBased color space");
return nullptr;
}
-#ifdef USE_CMS
const Object &obj1Ref = arr->getNF(1);
const Ref iccProfileStreamA = obj1Ref.isRef() ? obj1Ref.getRef() : Ref::INVALID();
+#ifdef USE_CMS
// check cache
if (out && iccProfileStreamA != Ref::INVALID()) {
if (auto *item = out->getIccColorSpaceCache()->lookup(iccProfileStreamA)) {
@@ -1925,7 +1925,7 @@ GfxColorSpace *GfxICCBasedColorSpace::parse(Array *arr, OutputDev *out, GfxState
error(errSyntaxWarning, -1, "Can't create transform");
cs->lineTransform = nullptr;
} else {
- cs->lineTransform = new GfxColorTransform(NULL, transform, cmsIntent, cst, dcst);
+ cs->lineTransform = new GfxColorTransform(nullptr, transform, cmsIntent, cst, dcst);
}
}
if (cs->transform == nullptr) {
@@ -2388,7 +2388,7 @@ char *GfxICCBasedColorSpace::getPostScriptCSA()
if (transform)
return transform->getPostScriptCSA();
else
- return NULL;
+ return nullptr;
}
#endif
diff --git a/poppler/GfxState.h b/poppler/GfxState.h
index 3da66e8c..e07cd2a8 100644
--- a/poppler/GfxState.h
+++ b/poppler/GfxState.h
@@ -545,7 +545,7 @@ public:
GfxICCBasedColorSpace(int nCompsA, GfxColorSpace *altA,
const Ref *iccProfileStreamA);
- ~GfxICCBasedColorSpace();
+ ~GfxICCBasedColorSpace() override;
GfxColorSpace *copy() const override;
GfxColorSpaceMode getMode() const override { return csICCBased; }
diff --git a/poppler/PSOutputDev.cc b/poppler/PSOutputDev.cc
index 9a920fbb..f2df0d66 100644
--- a/poppler/PSOutputDev.cc
+++ b/poppler/PSOutputDev.cc
@@ -6808,7 +6808,7 @@ void PSOutputDev::dumpColorSpaceL2(GfxState *state, GfxColorSpace *colorSpace,
break;
case csICCBased:
-#if USE_CMS
+#ifdef USE_CMS
{
GfxICCBasedColorSpace *iccBasedCS;
iccBasedCS = (GfxICCBasedColorSpace *)colorSpace;