diff options
author | Jacques Lucke <jacques@blender.org> | 2020-09-02 20:10:18 +0300 |
---|---|---|
committer | Jacques Lucke <jacques@blender.org> | 2020-09-02 20:10:40 +0300 |
commit | f5e55c33378b96e614710006121860eb880e6820 (patch) | |
tree | 4f24b19e6b5e187d9b7b3d43f741c26f2c843fc8 /source/blender/blenkernel/intern/colortools.c | |
parent | f20f82ce3ee55c12adcec024e0133e71183e07b3 (diff) |
Cleanup: use bool instead of int in various places
Diffstat (limited to 'source/blender/blenkernel/intern/colortools.c')
-rw-r--r-- | source/blender/blenkernel/intern/colortools.c | 30 |
1 files changed, 14 insertions, 16 deletions
diff --git a/source/blender/blenkernel/intern/colortools.c b/source/blender/blenkernel/intern/colortools.c index 116d8b1a82f..6fb2df04b3c 100644 --- a/source/blender/blenkernel/intern/colortools.c +++ b/source/blender/blenkernel/intern/colortools.c @@ -1151,50 +1151,48 @@ void BKE_curvemapping_evaluate_premulRGB(const CurveMapping *cumap, vecout_byte[2] = unit_float_to_uchar_clamp(vecout[2]); } -int BKE_curvemapping_RGBA_does_something(const CurveMapping *cumap) +bool BKE_curvemapping_RGBA_does_something(const CurveMapping *cumap) { - int a; - if (cumap->black[0] != 0.0f) { - return 1; + return true; } if (cumap->black[1] != 0.0f) { - return 1; + return true; } if (cumap->black[2] != 0.0f) { - return 1; + return true; } if (cumap->white[0] != 1.0f) { - return 1; + return true; } if (cumap->white[1] != 1.0f) { - return 1; + return true; } if (cumap->white[2] != 1.0f) { - return 1; + return true; } - for (a = 0; a < CM_TOT; a++) { + for (int a = 0; a < CM_TOT; a++) { if (cumap->cm[a].curve) { if (cumap->cm[a].totpoint != 2) { - return 1; + return true; } if (cumap->cm[a].curve[0].x != 0.0f) { - return 1; + return true; } if (cumap->cm[a].curve[0].y != 0.0f) { - return 1; + return true; } if (cumap->cm[a].curve[1].x != 1.0f) { - return 1; + return true; } if (cumap->cm[a].curve[1].y != 1.0f) { - return 1; + return true; } } } - return 0; + return false; } void BKE_curvemapping_init(CurveMapping *cumap) |