On Fri, 10 Dec 2010 02:30:27 +0900 Daniel Juyung Seo <seojuyu...@gmail.com>
said:

yes - it'd make it less indented - though wouldnt fix anything. i'd say worry
about this after we can merge everything and efl 1.0 freeze is over - we can
have a "fix formatting" binge when all pending stuff (or almost all of it) is
merged in.

> Hello,
> 
> I found that there are three big unnecessary 'if' statements in
> els_scroller.c in elementary.
> 
> ex)
> 
> static void
> _smart_event_mouse_down(...)
> {
>    ...
>    if (_elm_config->thumbscroll_enable)
>      {
>         Many small if statements and this is very LONG.
>      }
>    NOTHING HERE.
> }
> 
> I suggest to use 'return' if _elm_config->thumbscroll_enable equals to
> EINA_FALSE.
> This increases readability of code and reduces unnecessarily cascaded
> indentation.
> 
> suggestion)
> 
> static void
> _smart_event_mouse_down(...)
> {
>    ...
>    if (!_elm_config->thumbscroll_enable) return;
> 
>    "many small if statements"
> }
> 
> This pattern could be applied to _smart_event_mouse_move and
> _smart_event_mouse_up as well.
> Please give me some comments on this.
> Thanks.
> 
> Daniel Juyung Seo.


-- 
------------- Codito, ergo sum - "I code, therefore I am" --------------
The Rasterman (Carsten Haitzler)    ras...@rasterman.com


------------------------------------------------------------------------------
Lotusphere 2011
Register now for Lotusphere 2011 and learn how
to connect the dots, take your collaborative environment
to the next level, and enter the era of Social Business.
http://p.sf.net/sfu/lotusphere-d2d
_______________________________________________
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to