Would it be better to just store FALSE in mRenderTypeEnabled[0]?

On Sat, Oct 9, 2010 at 12:19 PM, Argent <secret.arg...@gmail.com> wrote:

> I don't normally gripe about stuff like this, but somehow this one
> triggered my twitches from 20 years of supporting PhD programmers.
> Brilliant guys, but sometimes it's SO hard to figure out what they're
> trying to do.
>
> This is a case where the trinary "?:" operator is much more readable
> and understandable.
>
> (type == 0) ? FALSE : mRenderTypeEnabled[type];
>
> But even better:
>
> if(type == 0)
>  return FALSE; // explain why here .. eg "in this context we are
> always rendering attached prims on the head when blah blah..."
> else
>  return mRenderTypeEnabled[type];
> _______________________________________________
> Policies and (un)subscribe information available here:
> http://wiki.secondlife.com/wiki/OpenSource-Dev
> Please read the policies before posting to keep unmoderated posting
> privileges
>
_______________________________________________
Policies and (un)subscribe information available here:
http://wiki.secondlife.com/wiki/OpenSource-Dev
Please read the policies before posting to keep unmoderated posting privileges

Reply via email to