From aa3a4973a30ff668a62447e18ac41f6c916b4a8b Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Fri, 6 Nov 2020 12:30:59 +1100 Subject: Cleanup: use ELEM macro --- source/blender/editors/interface/interface_draw.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'source/blender/editors/interface/interface_draw.c') diff --git a/source/blender/editors/interface/interface_draw.c b/source/blender/editors/interface/interface_draw.c index dec1710ac69..d9571dc98bd 100644 --- a/source/blender/editors/interface/interface_draw.c +++ b/source/blender/editors/interface/interface_draw.c @@ -973,15 +973,15 @@ void ui_draw_but_HISTOGRAM(ARegion *UNUSED(region), 1.0, 1.0, 1.0, 0.75, rect.xmin, rect.ymin, w, h, hist->data_a, res, is_line, pos); } else { - if (hist->mode == HISTO_MODE_RGB || hist->mode == HISTO_MODE_R) { + if (ELEM(hist->mode, HISTO_MODE_RGB, HISTO_MODE_R)) { histogram_draw_one( 1.0, 0.0, 0.0, 0.75, rect.xmin, rect.ymin, w, h, hist->data_r, res, is_line, pos); } - if (hist->mode == HISTO_MODE_RGB || hist->mode == HISTO_MODE_G) { + if (ELEM(hist->mode, HISTO_MODE_RGB, HISTO_MODE_G)) { histogram_draw_one( 0.0, 1.0, 0.0, 0.75, rect.xmin, rect.ymin, w, h, hist->data_g, res, is_line, pos); } - if (hist->mode == HISTO_MODE_RGB || hist->mode == HISTO_MODE_B) { + if (ELEM(hist->mode, HISTO_MODE_RGB, HISTO_MODE_B)) { histogram_draw_one( 0.0, 0.0, 1.0, 0.75, rect.xmin, rect.ymin, w, h, hist->data_b, res, is_line, pos); } -- cgit v1.2.3