mirror of
https://github.com/brl/mutter.git
synced 2024-11-12 17:27:03 -05:00
[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:
parent
9ea6ab76fb
commit
1cd313477b
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user