On Fri, Aug 08, 2008 at 12:51:18PM -0300, Gustavo Sverzut Barbieri wrote:
> On Fri, Aug 8, 2008 at 7:39 AM, Enlightenment CVS
> <[EMAIL PROTECTED]> wrote:
> 
> > +EAPI void eina_error_print(Eina_Error_Level level, const char *file,
> >                const char *fnc, int line, const char *fmt, ...)
> >  {
> >        va_list args;
> >
> >        va_start(args, fmt);
> > -       _error_print(level, file, fnc, line, fmt, args);
> > +       if (level <= _error_level)
> > +               _print_cb(level, file, fnc, line, fmt, _print_cb_data, 
> > args);
> >        va_end(args);
> > +}
> 
> Let's try to avoid this useless nesting and also making it more
> optimized, in this case, by using:
> 
> if (premature-exit-condition)
>     return;

IMHO, if possible exiting early, as you suggest, almost always leads to
cleaner code.

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
enlightenment-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to