Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/blenkernel/intern/colortools.c')
-rw-r--r--source/blender/blenkernel/intern/colortools.c30
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)