[Kstars-devel] branches/work/kdeedu_kstars_htm/kstars/kstars

Jason Harris kstars at 30doradus.org
Fri Aug 3 06:54:32 CEST 2007


Hi,

James Bowlin wrote:
> This is what baffles me.  I don't make a copy, I put a pointer to the 
> star itself into the ConstellationLines LineLists:
> 
> SkyObject *star = data->skyComposite()->findStarByGenetiveName( name );
> if ( star && lineList ) {
>     lineList->points()->append( star );
> }
> 
You want to be careful here.  The SkyLine destructor deletes all the 
SkyPoints in its list; this may cause problems because each star that is 
a constellation vertex will be double-deleted when KStars shuts down.

Maybe it's not a problem, but you should be aware of it.

> I rewrote FindStarByGenetiveName to use a hash to make the lookup fast
> so I'm certain there is no copying going on.  I had originally used
> a copy but that quickly broke badly as time advanced.  This is a
> different problem because the stars just jump a little and then the
> lines eventually catch up.  Is it possible that a StarObject will 
> occasionally return different (ra, dec) values depending on whether
> it is cast as a SkyPoint or a StarObject?  This seems unlikely.
> 
Hmm, that is weird.  I'll have to think about it.

> But I still need to re-index the constellation lines just like the
> stars because the stars are at new locations in the index due to
> proper motion.
> 




More information about the Kstars-devel mailing list