Skip to content

Commit

Permalink
first set of fixes/tweaks to also compile the code in /TP (Compile as…
Browse files Browse the repository at this point in the history
… C++) mode: this uncovered a few unneccessary casts and required a few others (void pointer conversions).

# Conflicts:
#	include/lcms2.h
#	include/lcms2_plugin.h
#	plugins/fast_float/src/fast_16_tethra.c
#	plugins/fast_float/src/fast_8_curves.c
#	plugins/fast_float/src/fast_8_matsh.c
#	plugins/fast_float/src/fast_8_matsh_sse.c
#	plugins/fast_float/src/fast_8_tethra.c
#	plugins/fast_float/src/fast_float_15mats.c
#	plugins/fast_float/src/fast_float_cmyk.c
#	plugins/fast_float/src/fast_float_curves.c
#	plugins/fast_float/src/fast_float_lab.c
#	plugins/fast_float/src/fast_float_matsh.c
#	plugins/fast_float/src/fast_float_tethra.c
#	plugins/threaded/src/threaded_internal.h
#	plugins/threaded/src/threaded_scheduler.c
#	src/cmscgats.c
#	src/cmstypes.c
#	src/cmsxform.c
#	src/extra_xform.h
  • Loading branch information
GerHobbelt committed Jan 12, 2025
1 parent 4001dd2 commit 347ae8d
Show file tree
Hide file tree
Showing 10 changed files with 16 additions and 16 deletions.
8 changes: 4 additions & 4 deletions plugins/fast_float/src/fast_8_curves.c
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ static void FastEvaluateRGBCurves8(struct _cmstransform_struct *CMMcargo,
_cmsComputeComponentIncrements(cmsGetTransformInputFormat((cmsHTRANSFORM)CMMcargo), Stride->BytesPerPlaneIn, NULL, &nalpha, SourceStartingOrder, SourceIncrements);
_cmsComputeComponentIncrements(cmsGetTransformOutputFormat((cmsHTRANSFORM)CMMcargo), Stride->BytesPerPlaneOut, NULL, &nalpha, DestStartingOrder, DestIncrements);

if (!(_cmsGetTransformFlags((cmsHTRANSFORM)CMMcargo) & cmsFLAGS_COPY_ALPHA))
if (!(_cmsGetTransformFlags(CMMcargo) & cmsFLAGS_COPY_ALPHA))
nalpha = 0;

strideIn = strideOut = 0;
Expand Down Expand Up @@ -142,7 +142,7 @@ static void FastRGBIdentity8(struct _cmstransform_struct *CMMcargo,
_cmsComputeComponentIncrements(cmsGetTransformInputFormat((cmsHTRANSFORM)CMMcargo), Stride->BytesPerPlaneIn, NULL, &nalpha, SourceStartingOrder, SourceIncrements);
_cmsComputeComponentIncrements(cmsGetTransformOutputFormat((cmsHTRANSFORM)CMMcargo), Stride->BytesPerPlaneOut, NULL, &nalpha, DestStartingOrder, DestIncrements);

if (!(_cmsGetTransformFlags((cmsHTRANSFORM)CMMcargo) & cmsFLAGS_COPY_ALPHA))
if (!(_cmsGetTransformFlags(CMMcargo) & cmsFLAGS_COPY_ALPHA))
nalpha = 0;

strideIn = strideOut = 0;
Expand Down Expand Up @@ -219,7 +219,7 @@ static void FastEvaluateGrayCurves8(struct _cmstransform_struct *CMMcargo,
_cmsComputeComponentIncrements(cmsGetTransformInputFormat((cmsHTRANSFORM)CMMcargo), Stride->BytesPerPlaneIn, NULL, &nalpha, SourceStartingOrder, SourceIncrements);
_cmsComputeComponentIncrements(cmsGetTransformOutputFormat((cmsHTRANSFORM)CMMcargo), Stride->BytesPerPlaneOut, NULL, &nalpha, DestStartingOrder, DestIncrements);

if (!(_cmsGetTransformFlags((cmsHTRANSFORM)CMMcargo) & cmsFLAGS_COPY_ALPHA))
if (!(_cmsGetTransformFlags(CMMcargo) & cmsFLAGS_COPY_ALPHA))
nalpha = 0;

strideIn = strideOut = 0;
Expand Down Expand Up @@ -283,7 +283,7 @@ static void FastGrayIdentity8(struct _cmstransform_struct *CMMcargo,
_cmsComputeComponentIncrements(cmsGetTransformInputFormat((cmsHTRANSFORM)CMMcargo), Stride->BytesPerPlaneIn, NULL, &nalpha, SourceStartingOrder, SourceIncrements);
_cmsComputeComponentIncrements(cmsGetTransformOutputFormat((cmsHTRANSFORM)CMMcargo), Stride->BytesPerPlaneOut, NULL, &nalpha, DestStartingOrder, DestIncrements);

if (!(_cmsGetTransformFlags((cmsHTRANSFORM)CMMcargo) & cmsFLAGS_COPY_ALPHA))
if (!(_cmsGetTransformFlags(CMMcargo) & cmsFLAGS_COPY_ALPHA))
nalpha = 0;

strideIn = strideOut = 0;
Expand Down
2 changes: 1 addition & 1 deletion plugins/fast_float/src/fast_8_matsh.c
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ void MatShaperXform8(struct _cmstransform_struct *CMMcargo,
_cmsComputeComponentIncrements(cmsGetTransformInputFormat((cmsHTRANSFORM)CMMcargo), Stride->BytesPerPlaneIn, NULL, &nalpha, SourceStartingOrder, SourceIncrements);
_cmsComputeComponentIncrements(cmsGetTransformOutputFormat((cmsHTRANSFORM)CMMcargo), Stride->BytesPerPlaneOut, NULL, &nalpha, DestStartingOrder, DestIncrements);

if (!(_cmsGetTransformFlags((cmsHTRANSFORM)CMMcargo) & cmsFLAGS_COPY_ALPHA))
if (!(_cmsGetTransformFlags(CMMcargo) & cmsFLAGS_COPY_ALPHA))
nalpha = 0;

strideIn = strideOut = 0;
Expand Down
2 changes: 1 addition & 1 deletion plugins/fast_float/src/fast_8_matsh_sse.c
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ void MatShaperXform8SSE(struct _cmstransform_struct *CMMcargo,
_cmsComputeComponentIncrements(cmsGetTransformInputFormat((cmsHTRANSFORM)CMMcargo), Stride->BytesPerPlaneIn, NULL, &nalpha, SourceStartingOrder, SourceIncrements);
_cmsComputeComponentIncrements(cmsGetTransformOutputFormat((cmsHTRANSFORM)CMMcargo), Stride->BytesPerPlaneOut, NULL, &nalpha, DestStartingOrder, DestIncrements);

if (!(_cmsGetTransformFlags((cmsHTRANSFORM)CMMcargo) & cmsFLAGS_COPY_ALPHA))
if (!(_cmsGetTransformFlags(CMMcargo) & cmsFLAGS_COPY_ALPHA))
nalpha = 0;

strideIn = strideOut = 0;
Expand Down
2 changes: 1 addition & 1 deletion plugins/fast_float/src/fast_8_tethra.c
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ void PerformanceEval8(struct _cmstransform_struct *CMMcargo,
_cmsComputeComponentIncrements(cmsGetTransformInputFormat((cmsHTRANSFORM)CMMcargo), Stride->BytesPerPlaneIn, NULL, &nalpha, SourceStartingOrder, SourceIncrements);
_cmsComputeComponentIncrements(cmsGetTransformOutputFormat((cmsHTRANSFORM)CMMcargo), Stride->BytesPerPlaneOut, NULL, &nalpha, DestStartingOrder, DestIncrements);

if (!(_cmsGetTransformFlags((cmsHTRANSFORM)CMMcargo) & cmsFLAGS_COPY_ALPHA))
if (!(_cmsGetTransformFlags(CMMcargo) & cmsFLAGS_COPY_ALPHA))
nalpha = 0;

strideIn = strideOut = 0;
Expand Down
2 changes: 1 addition & 1 deletion plugins/fast_float/src/fast_float_15mats.c
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ void MatShaperXform(struct _cmstransform_struct *CMMcargo,
_cmsComputeComponentIncrements(cmsGetTransformInputFormat((cmsHTRANSFORM)CMMcargo), Stride->BytesPerPlaneIn, NULL, &nalpha, SourceStartingOrder, SourceIncrements);
_cmsComputeComponentIncrements(cmsGetTransformOutputFormat((cmsHTRANSFORM)CMMcargo), Stride->BytesPerPlaneOut, NULL, &nalpha, DestStartingOrder, DestIncrements);

if (!(_cmsGetTransformFlags((cmsHTRANSFORM)CMMcargo) & cmsFLAGS_COPY_ALPHA))
if (!(_cmsGetTransformFlags(CMMcargo) & cmsFLAGS_COPY_ALPHA))
nalpha = 0;

strideIn = strideOut = 0;
Expand Down
2 changes: 1 addition & 1 deletion plugins/fast_float/src/fast_float_cmyk.c
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ void FloatCMYKCLUTEval(struct _cmstransform_struct *CMMcargo,
_cmsComputeComponentIncrements(InputFormat, Stride->BytesPerPlaneIn, &nchans, &nalpha, SourceStartingOrder, SourceIncrements);
_cmsComputeComponentIncrements(OutputFormat, Stride->BytesPerPlaneOut, &nchans, &nalpha, DestStartingOrder, DestIncrements);

if (!(_cmsGetTransformFlags((cmsHTRANSFORM)CMMcargo) & cmsFLAGS_COPY_ALPHA))
if (!(_cmsGetTransformFlags(CMMcargo) & cmsFLAGS_COPY_ALPHA))
nalpha = 0;

strideIn = strideOut = 0;
Expand Down
8 changes: 4 additions & 4 deletions plugins/fast_float/src/fast_float_curves.c
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ static void FastEvaluateFloatRGBCurves(struct _cmstransform_struct *CMMcargo,
_cmsComputeComponentIncrements(InputFormat, Stride->BytesPerPlaneIn, &nchans, &nalpha, SourceStartingOrder, SourceIncrements);
_cmsComputeComponentIncrements(OutputFormat, Stride->BytesPerPlaneOut, &nchans, &nalpha, DestStartingOrder, DestIncrements);

if (!(_cmsGetTransformFlags((cmsHTRANSFORM)CMMcargo) & cmsFLAGS_COPY_ALPHA))
if (!(_cmsGetTransformFlags(CMMcargo) & cmsFLAGS_COPY_ALPHA))
nalpha = 0;


Expand Down Expand Up @@ -171,7 +171,7 @@ static void FastFloatRGBIdentity(struct _cmstransform_struct *CMMcargo,
_cmsComputeComponentIncrements(InputFormat, Stride->BytesPerPlaneIn, &nchans, &nalpha, SourceStartingOrder, SourceIncrements);
_cmsComputeComponentIncrements(OutputFormat, Stride->BytesPerPlaneOut, &nchans, &nalpha, DestStartingOrder, DestIncrements);

if (!(_cmsGetTransformFlags((cmsHTRANSFORM)CMMcargo) & cmsFLAGS_COPY_ALPHA))
if (!(_cmsGetTransformFlags(CMMcargo) & cmsFLAGS_COPY_ALPHA))
nalpha = 0;

strideIn = strideOut = 0;
Expand Down Expand Up @@ -250,7 +250,7 @@ static void FastEvaluateFloatGrayCurves(struct _cmstransform_struct* CMMcargo,
_cmsComputeComponentIncrements(InputFormat, Stride->BytesPerPlaneIn, &nchans, &nalpha, SourceStartingOrder, SourceIncrements);
_cmsComputeComponentIncrements(OutputFormat, Stride->BytesPerPlaneIn, &nchans, &nalpha, DestStartingOrder, DestIncrements);

if (!(_cmsGetTransformFlags((cmsHTRANSFORM)CMMcargo) & cmsFLAGS_COPY_ALPHA))
if (!(_cmsGetTransformFlags(CMMcargo) & cmsFLAGS_COPY_ALPHA))
nalpha = 0;

strideIn = strideOut = 0;
Expand Down Expand Up @@ -313,7 +313,7 @@ static void FastFloatGrayIdentity(struct _cmstransform_struct* CMMcargo,
_cmsComputeComponentIncrements(InputFormat, Stride->BytesPerPlaneIn, &nchans, &nalpha, SourceStartingOrder, SourceIncrements);
_cmsComputeComponentIncrements(OutputFormat, Stride->BytesPerPlaneOut, &nchans, &nalpha, DestStartingOrder, DestIncrements);

if (!(_cmsGetTransformFlags((cmsHTRANSFORM)CMMcargo) & cmsFLAGS_COPY_ALPHA))
if (!(_cmsGetTransformFlags(CMMcargo) & cmsFLAGS_COPY_ALPHA))
nalpha = 0;

strideIn = strideOut = 0;
Expand Down
2 changes: 1 addition & 1 deletion plugins/fast_float/src/fast_float_lab.c
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ void LabCLUTEval(struct _cmstransform_struct* CMMcargo,
_cmsComputeComponentIncrements(InputFormat, Stride->BytesPerPlaneIn, &nchans, &nalpha, SourceStartingOrder, SourceIncrements);
_cmsComputeComponentIncrements(OutputFormat, Stride->BytesPerPlaneOut, &nchans, &nalpha, DestStartingOrder, DestIncrements);

if (!(_cmsGetTransformFlags((cmsHTRANSFORM)CMMcargo) & cmsFLAGS_COPY_ALPHA))
if (!(_cmsGetTransformFlags(CMMcargo) & cmsFLAGS_COPY_ALPHA))
nalpha = 0;

strideIn = strideOut = 0;
Expand Down
2 changes: 1 addition & 1 deletion plugins/fast_float/src/fast_float_matsh.c
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ void MatShaperFloat(struct _cmstransform_struct* CMMcargo,
_cmsComputeComponentIncrements(cmsGetTransformInputFormat((cmsHTRANSFORM)CMMcargo), Stride->BytesPerPlaneIn, &nchans, &nalpha, SourceStartingOrder, SourceIncrements);
_cmsComputeComponentIncrements(cmsGetTransformOutputFormat((cmsHTRANSFORM)CMMcargo), Stride->BytesPerPlaneOut, &nchans, &nalpha, DestStartingOrder, DestIncrements);

if (!(_cmsGetTransformFlags((cmsHTRANSFORM)CMMcargo) & cmsFLAGS_COPY_ALPHA))
if (!(_cmsGetTransformFlags(CMMcargo) & cmsFLAGS_COPY_ALPHA))
nalpha = 0;

strideIn = strideOut = 0;
Expand Down
2 changes: 1 addition & 1 deletion plugins/fast_float/src/fast_float_tethra.c
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ void FloatCLUTEval(struct _cmstransform_struct* CMMcargo,
_cmsComputeComponentIncrements(InputFormat, Stride->BytesPerPlaneIn, &nchans, &nalpha, SourceStartingOrder, SourceIncrements);
_cmsComputeComponentIncrements(OutputFormat, Stride->BytesPerPlaneOut, &nchans, &nalpha, DestStartingOrder, DestIncrements);

if (!(_cmsGetTransformFlags((cmsHTRANSFORM)CMMcargo) & cmsFLAGS_COPY_ALPHA))
if (!(_cmsGetTransformFlags(CMMcargo) & cmsFLAGS_COPY_ALPHA))
nalpha = 0;

strideIn = strideOut = 0;
Expand Down

0 comments on commit 347ae8d

Please sign in to comment.