diff --git a/ChangeLog b/ChangeLog index bd12a42d1..66209e95c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2008-01-25 Emmanuele Bassi + + * clutter/clutter-group.c: Use a shorter Z order sorting function, + avoiding the checks. + 2008-01-25 Øyvind Kolås * clutter/clutter-shader.c: added documentation strings for diff --git a/clutter/clutter-group.c b/clutter/clutter-group.c index 1505c2386..cee75b65b 100644 --- a/clutter/clutter-group.c +++ b/clutter/clutter-group.c @@ -389,13 +389,7 @@ sort_z_order (gconstpointer a, depth_a = clutter_actor_get_depth (CLUTTER_ACTOR(a)); depth_b = clutter_actor_get_depth (CLUTTER_ACTOR(b)); - if (depth_a == depth_b) - return 0; - - if (depth_a > depth_b) - return 1; - - return -1; + return (depth_b - depth_a); } static void