forked from enlightenment/efl
Refactor function to return as early as possible
Instead of a looooooong 'if', return on the contrary. SVN revision: 52134
This commit is contained in:
parent
fa4e9c4f18
commit
bd12ce52f7
|
@ -183,13 +183,15 @@ edje_file_group_exists(const char *file, const char *glob)
|
|||
Edje_File *edf;
|
||||
int error_ret = 0;
|
||||
Eina_Bool succeed = EINA_FALSE;
|
||||
|
||||
if ((!file) || (!*file)) return EINA_FALSE;
|
||||
edf = _edje_cache_file_coll_open(file, NULL, &error_ret, NULL);
|
||||
if (edf)
|
||||
{
|
||||
Edje_Patterns *patterns;
|
||||
|
||||
if ((!file) || (!*file))
|
||||
return EINA_FALSE;
|
||||
|
||||
edf = _edje_cache_file_coll_open(file, NULL, &error_ret, NULL);
|
||||
if (!edf)
|
||||
return EINA_FALSE;
|
||||
|
||||
if (edf->collection_patterns)
|
||||
{
|
||||
patterns = edf->collection_patterns;
|
||||
|
@ -216,7 +218,6 @@ edje_file_group_exists(const char *file, const char *glob)
|
|||
edf->collection_patterns = patterns;
|
||||
|
||||
_edje_cache_file_unref(edf);
|
||||
}
|
||||
return succeed;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue