|
From: | Ingo Ruhnke |
Subject: | Re: [Pingus-CVS] CVS: Games/Pingus/src/worldobjs hotspot.cxx,1.1,1.2 hotspot.hxx,1.1,1.2 |
Date: | 25 Sep 2002 13:59:21 +0200 |
User-agent: | Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 |
David Philippi <address@hidden> writes: > The easier way is usually to use > > sprite(data_->desc) > > Seems like I've overlooked a case where I used the wrong data pointer. This > method has the advantage that it still works if someone would reorder them > again due to an still unknown reason. The 'data' members should IMHO always initialisised first and placed at the first position in the class, that makes thing like the above nearly impossible. We have also a few situations where pointer get passed and not values and where &data_->pos is incorrect, while data->pos would be correct, initing them first avoids that. BTW. Any specific reason why we do: Hotspot::Hotspot (WorldObjsData::HotspotData* data_) and not: Hotspot::Hotspot (const WorldObjsData::HotspotData& data_) ? -- WWW: http://pingus.seul.org/~grumbel/ Games: http://pingus.seul.org/~grumbel/gamedesigns/ JabberID: address@hidden ICQ: 59461927
[Prev in Thread] | Current Thread | [Next in Thread] |