[clutter-actor] Use G_STMT_START/END instead of do { } while (0)

In the TRANSFORM_ABOUT_ANCHOR_COORD macro it now uses G_STMT_START and
G_STMT_END instead of directly using do/while because it's more
readable.
This commit is contained in:
Neil Roberts 2009-01-28 15:25:38 +00:00
parent 9ea6ab76fb
commit 1cd313477b

View File

@ -442,7 +442,7 @@ static gboolean clutter_anchor_coord_is_zero (const AnchorCoord *coord);
/* Helper macro which translates by the anchor coord, applies the
given transformation and then translates back */
#define TRANSFORM_ABOUT_ANCHOR_COORD(actor, coord, transform) \
do \
G_STMT_START \
{ \
ClutterUnit __tx, __ty, __tz; \
clutter_anchor_coord_get_units ((actor), (coord), \
@ -454,7 +454,8 @@ static gboolean clutter_anchor_coord_is_zero (const AnchorCoord *coord);
cogl_translate (-CLUTTER_UNITS_TO_FLOAT (__tx), \
-CLUTTER_UNITS_TO_FLOAT (__ty), \
-CLUTTER_UNITS_TO_FLOAT (__tz)); \
} while (0)
} \
G_STMT_END
G_DEFINE_ABSTRACT_TYPE_WITH_CODE (ClutterActor,
clutter_actor,