2008-02-25 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-actor.c: Remove the usage of g_return_if_fail() from static functions: either assert or use g_warning() to check internal state, as g_return_if_fail() can be compiled out. * clutter/clutter-main.c: Ditto as above.
This commit is contained in:
parent
db5b80465a
commit
bcd9a6dcec
@ -1,3 +1,11 @@
|
||||
2008-02-25 Emmanuele Bassi <ebassi@openedhand.com>
|
||||
|
||||
* clutter/clutter-actor.c: Remove the usage of g_return_if_fail()
|
||||
from static functions: either assert or use g_warning() to check
|
||||
internal state, as g_return_if_fail() can be compiled out.
|
||||
|
||||
* clutter/clutter-main.c: Ditto as above.
|
||||
|
||||
2008-02-25 Tomas Frydrych <tf@openedhand.com>
|
||||
|
||||
* clutter/clutter-texture.c:
|
||||
|
@ -605,8 +605,6 @@ clutter_actor_transform_point (ClutterActor *actor,
|
||||
ClutterFixed mtx[16];
|
||||
ClutterActorPrivate *priv;
|
||||
|
||||
g_return_if_fail (CLUTTER_IS_ACTOR (actor));
|
||||
|
||||
priv = actor->priv;
|
||||
|
||||
cogl_push_matrix();
|
||||
@ -729,8 +727,6 @@ clutter_actor_transform_vertices_relative (ClutterActor *self,
|
||||
* Need to query coords here, so that we get coorect values for actors that
|
||||
* do not modify priv->coords.
|
||||
*/
|
||||
g_return_if_fail (CLUTTER_IS_ACTOR (self));
|
||||
|
||||
clutter_actor_query_coords (self, &coords);
|
||||
|
||||
cogl_push_matrix();
|
||||
@ -806,8 +802,6 @@ clutter_actor_transform_vertices (ClutterActor *self,
|
||||
* Need to query coords here, so that we get coorect values for actors that
|
||||
* do not modify priv->coords.
|
||||
*/
|
||||
g_return_if_fail (CLUTTER_IS_ACTOR (self));
|
||||
|
||||
clutter_actor_query_coords (self, &coords);
|
||||
|
||||
cogl_push_matrix();
|
||||
@ -2783,8 +2777,6 @@ clutter_actor_get_abs_position_units (ClutterActor *self,
|
||||
ClutterVertex v1;
|
||||
ClutterVertex v2;
|
||||
|
||||
g_return_if_fail (CLUTTER_IS_ACTOR (self));
|
||||
|
||||
v1.x = v1.y = v1.z = 0;
|
||||
clutter_actor_apply_transform_to_point (self, &v1, &v2);
|
||||
|
||||
@ -5475,8 +5467,6 @@ clutter_actor_shader_pre_paint (ClutterActor *actor,
|
||||
ClutterShader *shader;
|
||||
ClutterMainContext *context;
|
||||
|
||||
g_return_if_fail (CLUTTER_IS_ACTOR (actor));
|
||||
|
||||
priv = actor->priv;
|
||||
shader_data = priv->shader_data;
|
||||
|
||||
@ -5505,8 +5495,6 @@ clutter_actor_shader_post_paint (ClutterActor *actor)
|
||||
ClutterShader *shader;
|
||||
ClutterMainContext *context;
|
||||
|
||||
g_return_if_fail (CLUTTER_IS_ACTOR (actor));
|
||||
|
||||
priv = actor->priv;
|
||||
shader_data = priv->shader_data;
|
||||
|
||||
|
@ -1182,10 +1182,17 @@ emit_event (ClutterEvent *event,
|
||||
ClutterActor *actor;
|
||||
gint i = 0, n_tree_events = 0;
|
||||
|
||||
g_return_if_fail (event->any.source != NULL);
|
||||
g_return_if_fail (lock == FALSE);
|
||||
if (!event->any.source)
|
||||
{
|
||||
g_warning ("No event source set, discarding event");
|
||||
return;
|
||||
}
|
||||
|
||||
lock = TRUE; /* Guard against reentrancy */
|
||||
/* reentrancy check */
|
||||
if (lock == FALSE)
|
||||
return;
|
||||
|
||||
lock = TRUE;
|
||||
|
||||
/* Sorry Mr Bassi. */
|
||||
if (G_UNLIKELY (event_tree == NULL))
|
||||
@ -1390,9 +1397,12 @@ clutter_do_event (ClutterEvent *event)
|
||||
{
|
||||
actor = clutter_stage_get_key_focus (CLUTTER_STAGE (stage));
|
||||
event->any.source = actor;
|
||||
g_return_if_fail (actor != NULL);
|
||||
if (G_UNLIKELY (actor == NULL))
|
||||
{
|
||||
g_warning ("No key focus set, discarding");
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
emit_keyboard_event (event);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user