Page MenuHomePhabricator

efl.ui.textbox: using efl_provider_find

Authored by ali.alzyod on Jan 17 2020, 10:04 AM.



Code structures like top = elm_widget_top_get(data); and if (efl_isa(top, EFL_UI_WIN_CLASS)) can be replaced with top = efl_provider_find(widget, EFL_UI_WIN_CLASS) No type check needed. (That should enhance the performance)

Diff Detail

rEFL core/efl
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.
ali.alzyod created this revision.Jan 17 2020, 10:04 AM

It seems that this patch has no reviewers specified. If you are unsure who can review your patch, please check this wiki page and see if anyone can be added:

ali.alzyod requested review of this revision.Jan 17 2020, 10:04 AM
cedric accepted this revision.Jan 17 2020, 10:52 AM
This revision is now accepted and ready to land.Jan 17 2020, 10:52 AM

It is basically fine. However, i think you could also remove the checks for top beeing not NULL. As every widget *must* be able to return theire window object. Otherwise the construction would have failed.

Let's remove "if (top)" . Then, I will close this :)

  • update to remove if(top) check
bu5hm4n accepted this revision.Jan 19 2020, 11:49 PM

Thank you:)

This revision was automatically updated to reflect the committed changes.