-#define COLORBALANCE_COMPILE(shader_stack, current_shader, aggregate_prev) \
-{ \
- if(aggregate_prev) \
- shader_stack[current_shader++] = colorbalance_get_pixel1; \
- else \
- shader_stack[current_shader++] = colorbalance_get_pixel2; \
- if(BC_CModels::is_yuv(get_output()->get_color_model())) \
- {\
- if(get_output()->get_params()->get("COLORBALANCE_PRESERVE", (int)0)) \
- shader_stack[current_shader++] = colorbalance_yuv_preserve_shader; \
- else \
- shader_stack[current_shader++] = colorbalance_yuv_shader; \
- } \
- else \
- shader_stack[current_shader++] = colorbalance_rgb_shader; \
-}
+#define COLORBALANCE_COMPILE(shader_stack, current_shader, aggregate_prev) do { \
+ shader_stack[current_shader++] = \
+ aggregate_prev ? colorbalance_get_pixel1 : colorbalance_get_pixel2; \
+ shader_stack[current_shader++] = \
+ !BC_CModels::is_yuv(get_output()->get_color_model()) ? colorbalance_rgb_shader : \
+ get_output()->get_params()->get("COLORBALANCE_PRESERVE", (int)0) ? \
+ colorbalance_yuv_preserve_shader : colorbalance_yuv_shader ; \
+} while(0)