mirror of
https://github.com/brl/mutter.git
synced 2024-11-22 16:10:41 -05:00
[group] avoid double evaluation of arguments in clutter_group_add
clutter_group_add would evaluate the actor argument twice, which is bad if this is a function call creating a new actor and not a variable.
This commit is contained in:
parent
a9f24351e9
commit
269598a2cf
@ -106,10 +106,10 @@ void clutter_group_remove_all (ClutterGroup *group);
|
||||
|
||||
/* for Mr. Mallum */
|
||||
#define clutter_group_add(group,actor) G_STMT_START { \
|
||||
if (CLUTTER_IS_GROUP ((group)) && CLUTTER_IS_ACTOR ((actor))) \
|
||||
ClutterActor *_actor = (ClutterActor *) (actor); \
|
||||
if (CLUTTER_IS_GROUP ((group)) && CLUTTER_IS_ACTOR ((_actor))) \
|
||||
{ \
|
||||
ClutterContainer *_container = (ClutterContainer *) (group); \
|
||||
ClutterActor *_actor = (ClutterActor *) (actor); \
|
||||
clutter_container_add_actor (_container, _actor); \
|
||||
} } G_STMT_END
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user