[Scummvm-devel] [Scummvm-cvs-logs] SF.net SVN: scummvm:[42192] scummvm/branches/gsoc2009-draci/engines/draci

Robert Špalek rspalek at gmail.com
Mon Jul 6 22:23:55 CEST 2009


On Mon, Jul 6, 2009 at 12:41 PM, <dkasak13 at users.sourceforge.net> wrote:

> +       int _transparent = dst->getTransparentColour();


two tiny comments applicable in general, should you agree.

1. it isn't a class member, so why do you start its name with an underscore?

2. it is a constant, so it would be self-documenting to label it such.  if
you say "const int transparent = ...;", then the compiler will make sure
that won't get changed by mistake.  now, this code is short and simple
enough that it isn't a big deal, but in more complicated cases this helps.

-- 
Robert Špalek <rspalek at gmail.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.scummvm.org/pipermail/scummvm-devel/attachments/20090706/db9bf4db/attachment.html>


More information about the Scummvm-devel mailing list