diff options
author | Lei Zhang <thestig@chromium.org> | 2018-04-13 20:38:37 +0000 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2018-04-13 20:38:37 +0000 |
commit | b71d24c1affe8648963ba5024b62e5dbf4479ae2 (patch) | |
tree | f7768f4484091b2f69905abc09316f3b8279b1d9 /third_party/lcms/src/cmsgamma.c | |
parent | af2ee2cc2e41709df7afc8f49f11ed2e8cf6dedf (diff) | |
download | pdfium-b71d24c1affe8648963ba5024b62e5dbf4479ae2.tar.xz |
Patch lcms to mark data structures as const.chromium/3397
BUG=pdfium:1015
Change-Id: I6b49d4a63fa197b489f6ff2a6920b7e65bb1279d
Reviewed-on: https://pdfium-review.googlesource.com/30672
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
Diffstat (limited to 'third_party/lcms/src/cmsgamma.c')
-rw-r--r-- | third_party/lcms/src/cmsgamma.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/third_party/lcms/src/cmsgamma.c b/third_party/lcms/src/cmsgamma.c index 6e36cf462e..eadbed8524 100644 --- a/third_party/lcms/src/cmsgamma.c +++ b/third_party/lcms/src/cmsgamma.c @@ -57,7 +57,7 @@ typedef struct _cmsParametricCurvesCollection_st { static cmsFloat64Number DefaultEvalParametricFn(cmsInt32Number Type, const cmsFloat64Number Params[], cmsFloat64Number R); // The built-in list -static _cmsParametricCurvesCollection DefaultCurves = { +static const _cmsParametricCurvesCollection DefaultCurves = { 9, // # of curve types { 1, 2, 3, 4, 5, 6, 7, 8, 108 }, // Parametric curve ID { 1, 3, 4, 5, 7, 4, 5, 5, 1 }, // Parameters by type @@ -161,7 +161,7 @@ cmsBool _cmsRegisterParametricCurvesPlugin(cmsContext ContextID, cmsPluginBase* // Search in type list, return position or -1 if not found static -int IsInSet(int Type, _cmsParametricCurvesCollection* c) +int IsInSet(int Type, const _cmsParametricCurvesCollection* c) { int i; @@ -174,9 +174,9 @@ int IsInSet(int Type, _cmsParametricCurvesCollection* c) // Search for the collection which contains a specific type static -_cmsParametricCurvesCollection *GetParametricCurveByType(cmsContext ContextID, int Type, int* index) +const _cmsParametricCurvesCollection *GetParametricCurveByType(cmsContext ContextID, int Type, int* index) { - _cmsParametricCurvesCollection* c; + const _cmsParametricCurvesCollection* c; int Position; _cmsCurvesPluginChunkType* ctx = ( _cmsCurvesPluginChunkType*) _cmsContextGetClientChunk(ContextID, CurvesPlugin); @@ -269,7 +269,7 @@ cmsToneCurve* AllocateToneCurveStruct(cmsContext ContextID, cmsInt32Number nEntr // is placed in advance to maximize performance. if (Segments != NULL && (nSegments > 0)) { - _cmsParametricCurvesCollection *c; + const _cmsParametricCurvesCollection *c; p ->SegInterp = (cmsInterpParams**) _cmsCalloc(ContextID, nSegments, sizeof(cmsInterpParams*)); if (p ->SegInterp == NULL) goto Error; @@ -714,7 +714,7 @@ cmsToneCurve* CMSEXPORT cmsBuildParametricToneCurve(cmsContext ContextID, cmsInt cmsCurveSegment Seg0; int Pos = 0; cmsUInt32Number size; - _cmsParametricCurvesCollection* c = GetParametricCurveByType(ContextID, Type, &Pos); + const _cmsParametricCurvesCollection* c = GetParametricCurveByType(ContextID, Type, &Pos); _cmsAssert(Params != NULL); |