elementary: simplify code by using proper helper.
authorCedric BAIL <cedric@osg.samsung.com>
Fri, 23 Nov 2018 00:45:17 +0000 (16:45 -0800)
committerHermet Park <hermetpark@gmail.com>
Wed, 5 Dec 2018 05:52:40 +0000 (14:52 +0900)
efl_loop_promise_new is a helper function that does automatically figure out an
available scheduler and create a promise from it. Basically replacing the call to
eina_promise_new(efl_loop_future_scheduler_get(o), ...).

Reviewed-by: Xavi Artigas <xavierartigas@yahoo.es>
Reviewed-by: Vitor Sousa da Silva <vitorsousa@expertisesolutions.com.br>
Differential Revision: https://phab.enlightenment.org/D7336

src/lib/elementary/efl_selection_manager.c

index cbca88b..3e8014b 100644 (file)
@@ -260,8 +260,7 @@ _update_sel_lost_list(Efl_Object *obj, Efl_Selection_Type type,
    sel_lost->seat_sel = seat_sel;
    seat_sel->sel_lost_list = eina_list_append(seat_sel->sel_lost_list, sel_lost);
 
-   p = eina_promise_new(efl_loop_future_scheduler_get(obj),
-                        _sel_manager_promise_cancel, NULL);
+   p = efl_loop_promise_new(obj, _sel_manager_promise_cancel, NULL);
    eina_promise_data_set(p, sel_lost);
    if (!p) return NULL;
    sel_lost->promise = p;