[Kstars-devel] Simplification KStarsData init.

Médéric Boquien mboquien at free.fr
Sun Aug 16 00:22:20 CEST 2009


Le Saturday 15 August 2009 17:34:57 Khudyakov Alexey, vous avez écrit :
> В сообщении от Воскресенье 16 августа 2009 00:56:25 автор Médéric Boquien
> 
> написал:
> > > No, it's only second. First place rightfully belongs to saturnmoons.
> > > That's the real mess. (-:
> >
> > I am not sure what you are refering to here exactly.
> 
> skyobjects/saturnmoons.{h,cpp}
> 
> It's code that induce horror (-:

Ah yes, the findPosition method is quite ugly. It almost looks like fortran 77 
code translated into C. I wonder if we could find some simpler code that would 
still be accurate enough for kstars.

> > > P.S. I found that there are a lot of unused code in KStars. Do anyone
> > > knows methods to find unused functions automatically. It would make
> > > refactoring easier.
> >
> > That would be useful too. Kstars went from KDE 2 to KDE 3 to KDE 4, it is
> > not surprising that there are some leftovers here and there. I have no
> > idea how to find unused methods though.
> 
> I use grep. It works but it's tiresome and it's easy to miss something.

Looking on internet i came across this tool: 
http://code.google.com/p/cppclean/ . Perhaps it could be of some use here? 
Apparently the -z option of gprof could be useful too.

Médéric


More information about the Kstars-devel mailing list