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

Robert Špalek rspalek at gmail.com
Mon Jul 6 22:07:25 CEST 2009


hi Denis,

On Mon, Jul 6, 2009 at 10:25 AM, <dkasak13 at users.sourceforge.net> wrote:

> Revision: 42183
>          http://scummvm.svn.sourceforge.net/scummvm/?rev=42183&view=rev
> Author:   dkasak13
> Date:     2009-07-06 17:25:34 +0000 (Mon, 06 Jul 2009)
>
> Log Message:
> -----------
> Implemented GPL operators.
>
> Modified Paths:
> --------------
>    scummvm/branches/gsoc2009-draci/engines/draci/script.cpp
>    scummvm/branches/gsoc2009-draci/engines/draci/script.h
>


>
>  typedef void (Script::* GPLHandler)(Common::Queue<int> &);
> +typedef int  (Script::* GPLOperatorHandler)(int, int);
>

completely unimportant and optional remark: you don't need these callbacks
to be normal methods of the class Script (i.e., methods that need a pointer
to an instance), but having them static methods or even just static global
functions should be enough.  this way you would emphasize that they are just
first-order functions without any access to the state, i.e. that they only
compute a mathematical function of their arguments.

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


More information about the Scummvm-git-logs mailing list