mirror of
https://github.com/brl/mutter.git
synced 2024-12-24 12:02:04 +00:00
Use G_VALUE_INIT instead of { 0, }
The macro avoids warnings from anal-retentive compilers.
This commit is contained in:
parent
be5921e6fb
commit
b3b1994c13
@ -12280,7 +12280,7 @@ parse_units (ClutterActor *self,
|
|||||||
ParseDimension dimension,
|
ParseDimension dimension,
|
||||||
JsonNode *node)
|
JsonNode *node)
|
||||||
{
|
{
|
||||||
GValue value = { 0, };
|
GValue value = G_VALUE_INIT;
|
||||||
gfloat retval = 0;
|
gfloat retval = 0;
|
||||||
|
|
||||||
if (JSON_NODE_TYPE (node) != JSON_NODE_VALUE)
|
if (JSON_NODE_TYPE (node) != JSON_NODE_VALUE)
|
||||||
|
@ -434,8 +434,8 @@ clutter_alpha_get_alpha (ClutterAlpha *alpha)
|
|||||||
}
|
}
|
||||||
else if (priv->closure)
|
else if (priv->closure)
|
||||||
{
|
{
|
||||||
GValue params = { 0, };
|
GValue params = G_VALUE_INIT;
|
||||||
GValue result_value = { 0, };
|
GValue result_value = G_VALUE_INIT;
|
||||||
|
|
||||||
g_object_ref (alpha);
|
g_object_ref (alpha);
|
||||||
|
|
||||||
|
@ -822,8 +822,8 @@ clutter_animation_bind (ClutterAnimation *animation,
|
|||||||
GParamSpec *pspec;
|
GParamSpec *pspec;
|
||||||
ClutterInterval *interval;
|
ClutterInterval *interval;
|
||||||
GType type;
|
GType type;
|
||||||
GValue initial = { 0, };
|
GValue initial = G_VALUE_INIT;
|
||||||
GValue real_final = { 0, };
|
GValue real_final = G_VALUE_INIT;
|
||||||
|
|
||||||
g_return_val_if_fail (CLUTTER_IS_ANIMATION (animation), NULL);
|
g_return_val_if_fail (CLUTTER_IS_ANIMATION (animation), NULL);
|
||||||
g_return_val_if_fail (property_name != NULL, NULL);
|
g_return_val_if_fail (property_name != NULL, NULL);
|
||||||
@ -1138,7 +1138,7 @@ on_timeline_frame (ClutterTimeline *timeline,
|
|||||||
{
|
{
|
||||||
const gchar *p_name = p->data;
|
const gchar *p_name = p->data;
|
||||||
ClutterInterval *interval;
|
ClutterInterval *interval;
|
||||||
GValue value = { 0, };
|
GValue value = G_VALUE_INIT;
|
||||||
gboolean apply;
|
gboolean apply;
|
||||||
|
|
||||||
interval = g_hash_table_lookup (priv->properties, p_name);
|
interval = g_hash_table_lookup (priv->properties, p_name);
|
||||||
@ -1765,7 +1765,7 @@ clutter_animation_setup_property (ClutterAnimation *animation,
|
|||||||
gboolean is_fixed)
|
gboolean is_fixed)
|
||||||
{
|
{
|
||||||
ClutterAnimationPrivate *priv = animation->priv;
|
ClutterAnimationPrivate *priv = animation->priv;
|
||||||
GValue real_value = { 0, };
|
GValue real_value = G_VALUE_INIT;
|
||||||
|
|
||||||
if (pspec->flags & G_PARAM_CONSTRUCT_ONLY)
|
if (pspec->flags & G_PARAM_CONSTRUCT_ONLY)
|
||||||
{
|
{
|
||||||
@ -1831,7 +1831,7 @@ done:
|
|||||||
if (G_LIKELY (!is_fixed))
|
if (G_LIKELY (!is_fixed))
|
||||||
{
|
{
|
||||||
ClutterInterval *interval;
|
ClutterInterval *interval;
|
||||||
GValue cur_value = { 0, };
|
GValue cur_value = G_VALUE_INIT;
|
||||||
|
|
||||||
g_value_init (&cur_value, G_PARAM_SPEC_VALUE_TYPE (pspec));
|
g_value_init (&cur_value, G_PARAM_SPEC_VALUE_TYPE (pspec));
|
||||||
|
|
||||||
@ -1972,7 +1972,7 @@ clutter_animation_setup_valist (ClutterAnimation *animation,
|
|||||||
while (property_name != NULL)
|
while (property_name != NULL)
|
||||||
{
|
{
|
||||||
GParamSpec *pspec;
|
GParamSpec *pspec;
|
||||||
GValue final = { 0, };
|
GValue final = G_VALUE_INIT;
|
||||||
gchar *error = NULL;
|
gchar *error = NULL;
|
||||||
gboolean is_fixed = FALSE;
|
gboolean is_fixed = FALSE;
|
||||||
GConnectFlags flags;
|
GConnectFlags flags;
|
||||||
|
@ -683,7 +683,7 @@ animation_animator_new_frame (ClutterTimeline *timeline,
|
|||||||
/* only change values if we active (delayed start) */
|
/* only change values if we active (delayed start) */
|
||||||
if (sub_progress >= 0.0 && sub_progress <= 1.0)
|
if (sub_progress >= 0.0 && sub_progress <= 1.0)
|
||||||
{
|
{
|
||||||
GValue tmp_value = { 0, };
|
GValue tmp_value = G_VALUE_INIT;
|
||||||
GType int_type;
|
GType int_type;
|
||||||
|
|
||||||
g_value_init (&tmp_value, G_VALUE_TYPE (&start_key->value));
|
g_value_init (&tmp_value, G_VALUE_TYPE (&start_key->value));
|
||||||
@ -801,7 +801,7 @@ animation_animator_started (ClutterTimeline *timeline,
|
|||||||
|
|
||||||
if (property_iter->ease_in)
|
if (property_iter->ease_in)
|
||||||
{
|
{
|
||||||
GValue tmp_value = { 0, };
|
GValue tmp_value = G_VALUE_INIT;
|
||||||
GType int_type;
|
GType int_type;
|
||||||
|
|
||||||
int_type = clutter_interval_get_value_type (property_iter->interval);
|
int_type = clutter_interval_get_value_type (property_iter->interval);
|
||||||
@ -1202,7 +1202,7 @@ clutter_animator_set (ClutterAnimator *animator,
|
|||||||
{
|
{
|
||||||
GParamSpec *pspec;
|
GParamSpec *pspec;
|
||||||
GObjectClass *klass;
|
GObjectClass *klass;
|
||||||
GValue value = { 0, };
|
GValue value = G_VALUE_INIT;
|
||||||
gchar *error = NULL;
|
gchar *error = NULL;
|
||||||
|
|
||||||
g_return_if_fail (object);
|
g_return_if_fail (object);
|
||||||
|
@ -786,8 +786,13 @@ static gboolean
|
|||||||
clutter_binding_entry_invoke (ClutterBindingEntry *entry,
|
clutter_binding_entry_invoke (ClutterBindingEntry *entry,
|
||||||
GObject *gobject)
|
GObject *gobject)
|
||||||
{
|
{
|
||||||
GValue params[4] = { { 0, }, { 0, }, { 0, }, { 0, } };
|
GValue params[4] = {
|
||||||
GValue result = { 0, };
|
G_VALUE_INIT,
|
||||||
|
G_VALUE_INIT,
|
||||||
|
G_VALUE_INIT,
|
||||||
|
G_VALUE_INIT
|
||||||
|
};
|
||||||
|
GValue result = G_VALUE_INIT;
|
||||||
gboolean retval = TRUE;
|
gboolean retval = TRUE;
|
||||||
|
|
||||||
g_value_init (¶ms[0], G_TYPE_OBJECT);
|
g_value_init (¶ms[0], G_TYPE_OBJECT);
|
||||||
|
@ -1241,7 +1241,7 @@ clutter_container_child_set (ClutterContainer *container,
|
|||||||
name = first_prop;
|
name = first_prop;
|
||||||
while (name)
|
while (name)
|
||||||
{
|
{
|
||||||
GValue value = { 0, };
|
GValue value = G_VALUE_INIT;
|
||||||
gchar *error = NULL;
|
gchar *error = NULL;
|
||||||
GParamSpec *pspec;
|
GParamSpec *pspec;
|
||||||
|
|
||||||
@ -1389,7 +1389,7 @@ clutter_container_child_get (ClutterContainer *container,
|
|||||||
name = first_prop;
|
name = first_prop;
|
||||||
while (name)
|
while (name)
|
||||||
{
|
{
|
||||||
GValue value = { 0, };
|
GValue value = G_VALUE_INIT;
|
||||||
gchar *error = NULL;
|
gchar *error = NULL;
|
||||||
GParamSpec *pspec;
|
GParamSpec *pspec;
|
||||||
|
|
||||||
|
@ -430,7 +430,7 @@ clutter_interval_set_initial_internal (ClutterInterval *interval,
|
|||||||
va_list *args)
|
va_list *args)
|
||||||
{
|
{
|
||||||
GType gtype = interval->priv->value_type;
|
GType gtype = interval->priv->value_type;
|
||||||
GValue value = { 0, };
|
GValue value = G_VALUE_INIT;
|
||||||
gchar *error;
|
gchar *error;
|
||||||
|
|
||||||
/* initial value */
|
/* initial value */
|
||||||
@ -459,7 +459,7 @@ clutter_interval_set_final_internal (ClutterInterval *interval,
|
|||||||
va_list *args)
|
va_list *args)
|
||||||
{
|
{
|
||||||
GType gtype = interval->priv->value_type;
|
GType gtype = interval->priv->value_type;
|
||||||
GValue value = { 0, };
|
GValue value = G_VALUE_INIT;
|
||||||
gchar *error;
|
gchar *error;
|
||||||
|
|
||||||
/* initial value */
|
/* initial value */
|
||||||
@ -488,7 +488,7 @@ clutter_interval_get_interval_valist (ClutterInterval *interval,
|
|||||||
va_list var_args)
|
va_list var_args)
|
||||||
{
|
{
|
||||||
GType gtype = interval->priv->value_type;
|
GType gtype = interval->priv->value_type;
|
||||||
GValue value = { 0, };
|
GValue value = G_VALUE_INIT;
|
||||||
gchar *error;
|
gchar *error;
|
||||||
|
|
||||||
/* initial value */
|
/* initial value */
|
||||||
|
@ -980,7 +980,7 @@ clutter_layout_manager_child_set (ClutterLayoutManager *manager,
|
|||||||
pname = first_property;
|
pname = first_property;
|
||||||
while (pname)
|
while (pname)
|
||||||
{
|
{
|
||||||
GValue value = { 0, };
|
GValue value = G_VALUE_INIT;
|
||||||
GParamSpec *pspec;
|
GParamSpec *pspec;
|
||||||
gchar *error;
|
gchar *error;
|
||||||
gboolean res;
|
gboolean res;
|
||||||
@ -1120,7 +1120,7 @@ clutter_layout_manager_child_get (ClutterLayoutManager *manager,
|
|||||||
pname = first_property;
|
pname = first_property;
|
||||||
while (pname)
|
while (pname)
|
||||||
{
|
{
|
||||||
GValue value = { 0, };
|
GValue value = G_VALUE_INIT;
|
||||||
GParamSpec *pspec;
|
GParamSpec *pspec;
|
||||||
gchar *error;
|
gchar *error;
|
||||||
gboolean res;
|
gboolean res;
|
||||||
|
@ -112,7 +112,7 @@ clutter_list_model_iter_get_value (ClutterModelIter *iter,
|
|||||||
ClutterListModelIter *iter_default;
|
ClutterListModelIter *iter_default;
|
||||||
GValue *values;
|
GValue *values;
|
||||||
GValue *iter_value;
|
GValue *iter_value;
|
||||||
GValue real_value = { 0, };
|
GValue real_value = G_VALUE_INIT;
|
||||||
gboolean converted = FALSE;
|
gboolean converted = FALSE;
|
||||||
|
|
||||||
iter_default = CLUTTER_LIST_MODEL_ITER (iter);
|
iter_default = CLUTTER_LIST_MODEL_ITER (iter);
|
||||||
@ -165,7 +165,7 @@ clutter_list_model_iter_set_value (ClutterModelIter *iter,
|
|||||||
ClutterListModelIter *iter_default;
|
ClutterListModelIter *iter_default;
|
||||||
GValue *values;
|
GValue *values;
|
||||||
GValue *iter_value;
|
GValue *iter_value;
|
||||||
GValue real_value = { 0, };
|
GValue real_value = G_VALUE_INIT;
|
||||||
gboolean converted = FALSE;
|
gboolean converted = FALSE;
|
||||||
|
|
||||||
iter_default = CLUTTER_LIST_MODEL_ITER (iter);
|
iter_default = CLUTTER_LIST_MODEL_ITER (iter);
|
||||||
|
@ -2006,7 +2006,7 @@ clutter_model_iter_set_internal_valist (ClutterModelIter *iter,
|
|||||||
|
|
||||||
while (column != -1)
|
while (column != -1)
|
||||||
{
|
{
|
||||||
GValue value = { 0, };
|
GValue value = G_VALUE_INIT;
|
||||||
gchar *error = NULL;
|
gchar *error = NULL;
|
||||||
GType col_type;
|
GType col_type;
|
||||||
|
|
||||||
@ -2172,7 +2172,7 @@ clutter_model_iter_get_valist (ClutterModelIter *iter,
|
|||||||
|
|
||||||
while (column != -1)
|
while (column != -1)
|
||||||
{
|
{
|
||||||
GValue value = { 0, };
|
GValue value = G_VALUE_INIT;
|
||||||
gchar *error = NULL;
|
gchar *error = NULL;
|
||||||
GType col_type;
|
GType col_type;
|
||||||
|
|
||||||
|
@ -1143,7 +1143,7 @@ _clutter_script_parse_node (ClutterScript *script,
|
|||||||
JsonNode *node,
|
JsonNode *node,
|
||||||
GParamSpec *pspec)
|
GParamSpec *pspec)
|
||||||
{
|
{
|
||||||
GValue node_value = { 0, };
|
GValue node_value = G_VALUE_INIT;
|
||||||
gboolean retval = FALSE;
|
gboolean retval = FALSE;
|
||||||
|
|
||||||
g_return_val_if_fail (CLUTTER_IS_SCRIPT (script), FALSE);
|
g_return_val_if_fail (CLUTTER_IS_SCRIPT (script), FALSE);
|
||||||
@ -1662,7 +1662,7 @@ apply_layout_properties (ClutterScript *script,
|
|||||||
for (l = properties; l != NULL; l = l->next)
|
for (l = properties; l != NULL; l = l->next)
|
||||||
{
|
{
|
||||||
PropertyInfo *pinfo = l->data;
|
PropertyInfo *pinfo = l->data;
|
||||||
GValue value = { 0, };
|
GValue value = G_VALUE_INIT;
|
||||||
gboolean res = FALSE;
|
gboolean res = FALSE;
|
||||||
const gchar *name;
|
const gchar *name;
|
||||||
|
|
||||||
@ -1762,7 +1762,7 @@ apply_child_properties (ClutterScript *script,
|
|||||||
for (l = properties; l != NULL; l = l->next)
|
for (l = properties; l != NULL; l = l->next)
|
||||||
{
|
{
|
||||||
PropertyInfo *pinfo = l->data;
|
PropertyInfo *pinfo = l->data;
|
||||||
GValue value = { 0, };
|
GValue value = G_VALUE_INIT;
|
||||||
gboolean res = FALSE;
|
gboolean res = FALSE;
|
||||||
const gchar *name;
|
const gchar *name;
|
||||||
|
|
||||||
|
@ -679,7 +679,7 @@ clutter_shader_effect_set_uniform_valist (ClutterShaderEffect *effect,
|
|||||||
gsize n_values,
|
gsize n_values,
|
||||||
va_list *args)
|
va_list *args)
|
||||||
{
|
{
|
||||||
GValue value = { 0, };
|
GValue value = G_VALUE_INIT;
|
||||||
|
|
||||||
if (value_type == CLUTTER_TYPE_SHADER_INT)
|
if (value_type == CLUTTER_TYPE_SHADER_INT)
|
||||||
{
|
{
|
||||||
|
@ -339,7 +339,7 @@ clutter_state_key_new (State *state,
|
|||||||
{
|
{
|
||||||
ClutterStatePrivate *priv = state->clutter_state->priv;
|
ClutterStatePrivate *priv = state->clutter_state->priv;
|
||||||
ClutterStateKey *state_key;
|
ClutterStateKey *state_key;
|
||||||
GValue value = { 0, };
|
GValue value = G_VALUE_INIT;
|
||||||
|
|
||||||
state_key = g_slice_new0 (ClutterStateKey);
|
state_key = g_slice_new0 (ClutterStateKey);
|
||||||
|
|
||||||
@ -600,7 +600,7 @@ clutter_state_new_frame (ClutterTimeline *timeline,
|
|||||||
if (key->is_animatable)
|
if (key->is_animatable)
|
||||||
{
|
{
|
||||||
ClutterAnimatable *animatable;
|
ClutterAnimatable *animatable;
|
||||||
GValue value = { 0, };
|
GValue value = G_VALUE_INIT;
|
||||||
gboolean res;
|
gboolean res;
|
||||||
|
|
||||||
animatable = CLUTTER_ANIMATABLE (key->object);
|
animatable = CLUTTER_ANIMATABLE (key->object);
|
||||||
@ -735,7 +735,7 @@ clutter_state_change (ClutterState *state,
|
|||||||
for (k = new_state->keys; k != NULL; k = k->next)
|
for (k = new_state->keys; k != NULL; k = k->next)
|
||||||
{
|
{
|
||||||
ClutterStateKey *key = k->data;
|
ClutterStateKey *key = k->data;
|
||||||
GValue initial = { 0, };
|
GValue initial = G_VALUE_INIT;
|
||||||
|
|
||||||
/* Reset the pre-pre-delay - this is only used for setting keys
|
/* Reset the pre-pre-delay - this is only used for setting keys
|
||||||
* during transitions.
|
* during transitions.
|
||||||
@ -985,7 +985,7 @@ clutter_state_set (ClutterState *state,
|
|||||||
while (object != NULL)
|
while (object != NULL)
|
||||||
{
|
{
|
||||||
GParamSpec *pspec;
|
GParamSpec *pspec;
|
||||||
GValue value = { 0, };
|
GValue value = G_VALUE_INIT;
|
||||||
gchar *error = NULL;
|
gchar *error = NULL;
|
||||||
gboolean is_delayed = FALSE;
|
gboolean is_delayed = FALSE;
|
||||||
|
|
||||||
@ -1095,7 +1095,7 @@ clutter_state_set_key_internal (ClutterState *state,
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
/* Set the ClutterInterval associated with the state */
|
/* Set the ClutterInterval associated with the state */
|
||||||
GValue initial = { 0, };
|
GValue initial = G_VALUE_INIT;
|
||||||
gdouble progress = clutter_timeline_get_progress (priv->timeline);
|
gdouble progress = clutter_timeline_get_progress (priv->timeline);
|
||||||
|
|
||||||
g_value_init (&initial,
|
g_value_init (&initial,
|
||||||
|
Loading…
Reference in New Issue
Block a user