[opensource-dev] Fix for "Attachments displayed in mouselook" bug

Argent secret.argent at gmail.com
Sat Oct 9 09:19:43 PDT 2010


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];


More information about the opensource-dev mailing list