diff options
author | Simon McVittie <simon.mcvittie@collabora.co.uk> | 2010-05-21 12:09:58 +0100 |
---|---|---|
committer | Simon McVittie <simon.mcvittie@collabora.co.uk> | 2010-05-21 12:09:58 +0100 |
commit | 28644244e5459b8143c52d6b0a10c76940a188b6 (patch) | |
tree | eec133c6251bd5fc5ca00cf3e02c70e701d3ef8c /telepathy-glib/properties-mixin.c | |
parent | a72c557edd25a709598e2d470a56a40213e9dd67 (diff) | |
download | telepathy-glib-28644244e5459b8143c52d6b0a10c76940a188b6.tar.gz |
TpPropertiesMixin: use TpIntSetFastIter
Diffstat (limited to 'telepathy-glib/properties-mixin.c')
-rw-r--r-- | telepathy-glib/properties-mixin.c | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/telepathy-glib/properties-mixin.c b/telepathy-glib/properties-mixin.c index 894be196a..d1b6d2e45 100644 --- a/telepathy-glib/properties-mixin.c +++ b/telepathy-glib/properties-mixin.c @@ -877,8 +877,9 @@ tp_properties_mixin_emit_changed (GObject *obj, const TpIntSet *props) G_OBJECT_GET_CLASS (obj)); GPtrArray *prop_arr; GValue prop_list = { 0, }; - TpIntSetIter iter = TP_INTSET_ITER_INIT (props); + TpIntSetFastIter iter; guint len = tp_intset_size (props); + guint prop_id; if (len == 0) { @@ -892,10 +893,11 @@ tp_properties_mixin_emit_changed (GObject *obj, const TpIntSet *props) "%s: emitting properties changed for propert%s:\n", G_STRFUNC, (len > 1) ? "ies" : "y"); - while (tp_intset_iter_next (&iter)) + tp_intset_fast_iter_init (&iter, props); + + while (tp_intset_fast_iter_next (&iter, &prop_id)) { GValue prop_val = { 0, }; - guint prop_id = iter.element; g_value_init (&prop_val, TP_STRUCT_TYPE_PROPERTY_VALUE); g_value_take_boxed (&prop_val, @@ -944,8 +946,9 @@ tp_properties_mixin_emit_flags (GObject *obj, const TpIntSet *props) G_OBJECT_GET_CLASS (obj)); GPtrArray *prop_arr; GValue prop_list = { 0, }; - TpIntSetIter iter = TP_INTSET_ITER_INIT (props); + TpIntSetFastIter iter; guint len = tp_intset_size (props); + guint prop_id; if (len == 0) { @@ -959,10 +962,11 @@ tp_properties_mixin_emit_flags (GObject *obj, const TpIntSet *props) "%s: emitting properties flags changed for propert%s:\n", G_STRFUNC, (len > 1) ? "ies" : "y"); - while (tp_intset_iter_next (&iter)) + tp_intset_fast_iter_init (&iter, props); + + while (tp_intset_fast_iter_next (&iter, &prop_id)) { GValue prop_val = { 0, }; - guint prop_id = iter.element; guint prop_flags; prop_flags = mixin->properties[prop_id].flags; |