pingus-devel
[Top][All Lists]
Advanced

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

Re: [Pingus-CVS] CVS: Games/Pingus/src/worldobjs hotspot.cxx,1.1,1.2 hot


From: David Philippi
Subject: Re: [Pingus-CVS] CVS: Games/Pingus/src/worldobjs hotspot.cxx,1.1,1.2 hotspot.hxx,1.1,1.2
Date: Wed, 25 Sep 2002 15:50:23 +0200
User-agent: KMail/1.4.1

On Wednesday 25 September 2002 13:59, Ingo Ruhnke wrote:

> 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.

I'll walk through the code and change it where required.

> BTW. Any specific reason why we do:
> Hotspot::Hotspot (WorldObjsData::HotspotData* data_)
> and not:
> Hotspot::Hotspot (const WorldObjsData::HotspotData& data_)

I've used pointers to avoid the need to include hotspot_data.hxx. Therefore I 
also used pointers to pass the data.
If you want to change it to a const reference that's no problem at all, I 
just don't see the advantage:

Hotspot::Hotspot (const WorldObjsData::HotspotData& data_) :
  data (new WorldObjsData::HotSpotData(data_))

is IMHO even more to type then

Hotspot::Hotspot (WorldObjsData::HotspotData* data_) :
  data (new WorldObjsData::HotSpotData(*data_))

Or do you want to save the time of one pointer dereferencing? ;-)

Bye David





reply via email to

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