edje: remove redundant fetch code in file.set method 48/154248/1
authorJee-Yong Um <jc9.um@samsung.com>
Tue, 15 Mar 2016 18:39:47 +0000 (11:39 -0700)
committerThiep Ha <thiep.ha@samsung.com>
Tue, 10 Oct 2017 02:18:14 +0000 (11:18 +0900)
Summary:
Edje data structure is passed as a parameter, but in file.set method
_edje_fetch() is called one more time unnecessarily.

Reviewers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D3788

Change-Id: I87ea885f9f47881b7ea17c4f39839c8f72e5becb
Signed-off-by: Cedric Bail <cedric@osg.samsung.com>
src/lib/edje/edje_smart.c

index 272c79d..01b21e2 100644 (file)
@@ -375,7 +375,7 @@ _edje_object_evas_object_smart_calculate(Eo *obj EINA_UNUSED, Edje *ed)
 }
 
 EOLIAN static Eina_Bool
-_edje_object_efl_file_file_set(Eo *obj, Edje *_pd EINA_UNUSED, const char *file, const char *group)
+_edje_object_efl_file_file_set(Eo *obj, Edje *ed, const char *file, const char *group)
 {
    Eina_Bool ret;
    Eina_File *f = NULL;
@@ -388,9 +388,6 @@ _edje_object_efl_file_file_set(Eo *obj, Edje *_pd EINA_UNUSED, const char *file,
         f = eina_file_open(file, EINA_FALSE);
         if (!f)
           {
-             Edje *ed;
-
-             ed = _edje_fetch(obj);
              ed->load_error = EDJE_LOAD_ERROR_DOES_NOT_EXIST;
              return ret;
           }