mirror of
https://github.com/brl/mutter.git
synced 2024-11-28 19:10:43 -05:00
clutter/actor: Use switch instead of if/else
To improve legibility of the code. https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1489
This commit is contained in:
parent
a84dccfd64
commit
80bd44cba0
@ -3364,12 +3364,19 @@ _clutter_actor_paint_cull_result (ClutterActor *self,
|
||||
|
||||
if (success)
|
||||
{
|
||||
if (result == CLUTTER_CULL_RESULT_IN)
|
||||
switch (result)
|
||||
{
|
||||
case CLUTTER_CULL_RESULT_IN:
|
||||
clutter_color_init (&color, 0, 255, 0, 255);
|
||||
else if (result == CLUTTER_CULL_RESULT_OUT)
|
||||
break;
|
||||
case CLUTTER_CULL_RESULT_OUT:
|
||||
clutter_color_init (&color, 0, 0, 255, 255);
|
||||
else
|
||||
break;
|
||||
case CLUTTER_CULL_RESULT_PARTIAL:
|
||||
default:
|
||||
clutter_color_init (&color, 0, 255, 255, 255);
|
||||
break;
|
||||
}
|
||||
}
|
||||
else
|
||||
clutter_color_init (&color, 255, 255, 255, 255);
|
||||
|
Loading…
Reference in New Issue
Block a user