pingus-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: none


From: Ingo Ruhnke
Subject: Re: none
Date: 14 Aug 2002 17:26:58 +0200
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2

address@hidden writes:

> RCS file: /usr/local/cvsroot/Games/Pingus/src/input/scroller_factory.cxx,v
[...]
> -    if (xmlIsBlankNode(cur))
> -      cur = cur->next;

Factories must not jump around in the XML tree, they should work on
the node they get and fail if it is an empty one. Since the above kind
cause quite funny and hard to track down errors, like this one:

AxisFactory::create(cur);
AxisFactory::create(cur->next);

Both factories will refer to the *same* node when the xmlIsBlankNode()
check is done in the factory and cur is an empty node, instead of
giving an error about an incorrect node as one would expect.

>-     virtual float get_y_delta () const =0;
>+     virtual const float& get_y_delta () const =0;

Any special reason for replacing float with 'const float&'? I thought
const references would be kind of useless on primitive datatypes.

-- 
WWW:      http://pingus.seul.org/~grumbel/ 
Games:    http://pingus.seul.org/~grumbel/gamedesigns/
JabberID: address@hidden 
ICQ:      59461927




reply via email to

[Prev in Thread] Current Thread [Next in Thread]