From 12f3e4a58f05850b93af35619cb04f0231d86acc Mon Sep 17 00:00:00 2001 From: tsepez Date: Wed, 2 Nov 2016 15:17:29 -0700 Subject: Remove FX_BOOL from core Review-Url: https://codereview.chromium.org/2477443002 --- core/fxcodec/codec/fx_codec_icc.cpp | 28 +++++++++++++--------------- 1 file changed, 13 insertions(+), 15 deletions(-) (limited to 'core/fxcodec/codec/fx_codec_icc.cpp') diff --git a/core/fxcodec/codec/fx_codec_icc.cpp b/core/fxcodec/codec/fx_codec_icc.cpp index f0ea6bb43c..085452223d 100644 --- a/core/fxcodec/codec/fx_codec_icc.cpp +++ b/core/fxcodec/codec/fx_codec_icc.cpp @@ -18,45 +18,43 @@ struct CLcmsCmm { cmsHTRANSFORM m_hTransform; int m_nSrcComponents; int m_nDstComponents; - FX_BOOL m_bLab; + bool m_bLab; }; -FX_BOOL CheckComponents(cmsColorSpaceSignature cs, - int nComponents, - FX_BOOL bDst) { +bool CheckComponents(cmsColorSpaceSignature cs, int nComponents, bool bDst) { if (nComponents <= 0 || nComponents > 15) { - return FALSE; + return false; } switch (cs) { case cmsSigLabData: if (nComponents < 3) { - return FALSE; + return false; } break; case cmsSigGrayData: if (bDst && nComponents != 1) { - return FALSE; + return false; } if (!bDst && nComponents > 2) { - return FALSE; + return false; } break; case cmsSigRgbData: if (bDst && nComponents != 3) { - return FALSE; + return false; } break; case cmsSigCmykData: if (bDst && nComponents != 4) { - return FALSE; + return false; } break; default: if (nComponents != 3) { - return FALSE; + return false; } break; } - return TRUE; + return true; } uint32_t GetCSComponents(cmsColorSpaceSignature cs) { @@ -108,13 +106,13 @@ void* IccLib_CreateTransform(const unsigned char* pSrcProfileData, return nullptr; } int srcFormat; - FX_BOOL bLab = FALSE; + bool bLab = false; cmsColorSpaceSignature srcCS = cmsGetColorSpace(srcProfile); nSrcComponents = GetCSComponents(srcCS); if (srcCS == cmsSigLabData) { srcFormat = COLORSPACE_SH(PT_Lab) | CHANNELS_SH(nSrcComponents) | BYTES_SH(0); - bLab = TRUE; + bLab = true; } else { srcFormat = COLORSPACE_SH(PT_ANY) | CHANNELS_SH(nSrcComponents) | BYTES_SH(1); @@ -123,7 +121,7 @@ void* IccLib_CreateTransform(const unsigned char* pSrcProfileData, } } cmsColorSpaceSignature dstCS = cmsGetColorSpace(dstProfile); - if (!CheckComponents(dstCS, nDstComponents, TRUE)) { + if (!CheckComponents(dstCS, nDstComponents, true)) { cmsCloseProfile(srcProfile); cmsCloseProfile(dstProfile); return nullptr; -- cgit v1.2.3