More use of iterator macro.

SVN revision: 36852
This commit is contained in:
Cedric BAIL 2008-10-20 12:36:48 +00:00
parent 5497660f72
commit bdfed791ea
2 changed files with 13 additions and 33 deletions

View File

@ -41,16 +41,11 @@ evas_object_event_callback_clear(Evas_Object *obj)
void
evas_object_event_callback_all_del(Evas_Object *obj)
{
Eina_Inlist *l;
Evas_Func_Node *fn;
if (!obj->callbacks) return;
for (l = obj->callbacks->callbacks; l; l = l->next)
{
Evas_Func_Node *fn;
fn = (Evas_Func_Node *)l;
fn->delete_me = 1;
}
EINA_INLIST_ITER_NEXT(obj->callbacks->callbacks, fn)
fn->delete_me = 1;
}
void
@ -380,7 +375,7 @@ EAPI void *
evas_object_event_callback_del(Evas_Object *obj, Evas_Callback_Type type, void (*func) (void *data, Evas *e, Evas_Object *obj, void *event_info))
{
/* MEM OK */
Eina_Inlist *l;
Evas_Func_Node *fn;
MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
return NULL;
@ -390,11 +385,8 @@ evas_object_event_callback_del(Evas_Object *obj, Evas_Callback_Type type, void (
if (!obj->callbacks) return NULL;
for (l = obj->callbacks->callbacks; l; l = l->next)
EINA_INLIST_ITER_NEXT(obj->callbacks->callbacks, fn)
{
Evas_Func_Node *fn;
fn = (Evas_Func_Node *)l;
if ((fn->func == func) && (fn->type == type) && (!fn->delete_me))
{
void *data;
@ -440,7 +432,7 @@ EAPI void *
evas_object_event_callback_del_full(Evas_Object *obj, Evas_Callback_Type type, void (*func) (void *data, Evas *e, Evas_Object *obj, void *event_info), const void *data)
{
/* MEM OK */
Eina_Inlist *l;
Evas_Func_Node *fn;
MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
return NULL;
@ -450,11 +442,8 @@ evas_object_event_callback_del_full(Evas_Object *obj, Evas_Callback_Type type, v
if (!obj->callbacks) return NULL;
for (l = obj->callbacks->callbacks; l; l = l->next)
EINA_INLIST_ITER_NEXT(obj->callbacks->callbacks, fn)
{
Evas_Func_Node *fn;
fn = (Evas_Func_Node *)l;
if ((fn->func == func) && (fn->type == type) && (fn->data == data) && (!fn->delete_me))
{
void *data;

View File

@ -91,14 +91,11 @@ evas_common_font_source_load_complete(RGBA_Font_Source *fs)
EAPI RGBA_Font_Source *
evas_common_font_source_find(const char *name)
{
Eina_Inlist *l;
RGBA_Font_Source *fs;
if (!name) return NULL;
for (l = fonts_src; l; l = l->next)
EINA_INLIST_ITER_NEXT(fonts_src, fs)
{
RGBA_Font_Source *fs;
fs = (RGBA_Font_Source *)l;
if ((fs->name) && (!strcmp(name, fs->name)))
{
fs->references++;
@ -549,14 +546,11 @@ font_flush_free_glyph_cb(const Evas_Hash *hash, const char *key, void *data, voi
EAPI void
evas_common_font_flush_last(void)
{
Eina_Inlist *l;
RGBA_Font_Int *fi_tmp;
RGBA_Font_Int *fi = NULL;
for (l = fonts; l; l = l->next)
EINA_INLIST_ITER_NEXT(fonts, fi_tmp)
{
RGBA_Font_Int *fi_tmp;
fi_tmp = (RGBA_Font_Int *)l;
if (fi_tmp->references == 0) fi = fi_tmp;
}
if (!fi) return;
@ -577,13 +571,10 @@ evas_common_font_flush_last(void)
EAPI RGBA_Font_Int *
evas_common_font_int_find(const char *name, int size)
{
Eina_Inlist *l;
RGBA_Font_Int *fi;
for (l = fonts; l; l = l->next)
EINA_INLIST_ITER_NEXT(fonts, fi)
{
RGBA_Font_Int *fi;
fi = (RGBA_Font_Int *)l;
if ((fi->size == size) && (!strcmp(name, fi->src->name)))
{
if (fi->references == 0) evas_common_font_int_modify_cache_by(fi, -1);