clone: Remove unnecessary G_UNLIKELY macros
A Clone:source property might be NULL, and we should not penalize performance when we can just bail out early, because that would kind of defeat the point.
This commit is contained in:
parent
12f80db8b8
commit
e005892534
@ -155,7 +155,7 @@ clutter_clone_paint (ClutterActor *self)
|
|||||||
ClutterClonePrivate *priv = clone->priv;
|
ClutterClonePrivate *priv = clone->priv;
|
||||||
gboolean was_unmapped = FALSE;
|
gboolean was_unmapped = FALSE;
|
||||||
|
|
||||||
if (G_UNLIKELY (priv->clone_source == NULL))
|
if (priv->clone_source == NULL)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
CLUTTER_NOTE (PAINT,
|
CLUTTER_NOTE (PAINT,
|
||||||
@ -218,7 +218,7 @@ clutter_clone_allocate (ClutterActor *self,
|
|||||||
parent_class = CLUTTER_ACTOR_CLASS (clutter_clone_parent_class);
|
parent_class = CLUTTER_ACTOR_CLASS (clutter_clone_parent_class);
|
||||||
parent_class->allocate (self, box, flags);
|
parent_class->allocate (self, box, flags);
|
||||||
|
|
||||||
if (G_UNLIKELY (priv->clone_source == NULL))
|
if (priv->clone_source == NULL)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
/* we act like a "foster parent" for the source we are cloning;
|
/* we act like a "foster parent" for the source we are cloning;
|
||||||
|
Loading…
Reference in New Issue
Block a user