On Sat, Aug 9, 2008 at 3:37 AM, Simon Horman <[EMAIL PROTECTED]> wrote:
> 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.

ACK... using this and also writing smaller functions would help a lot
(even more because you can easily use this technique).

/me looks at raster.

-- 
Gustavo Sverzut Barbieri
http://profusion.mobi embedded systems
--------------------------------------
MSN: [EMAIL PROTECTED]
Skype: gsbarbieri
Mobile: +55 (19) 9225-2202

-------------------------------------------------------------------------
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
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to