[Kstars-devel] [kstars] kstars/skycomponents: Somewhat minor improvement in speed. Should not introduce any bugs.
Akarsh Simha
akarshsimha at gmail.com
Sun Oct 30 07:47:05 UTC 2011
Git commit 7fa00fcda6ba7758d810cf205776ca2698c21b61 by Akarsh Simha.
Committed on 30/10/2011 at 08:46.
Pushed by asimha into branch 'master'.
Somewhat minor improvement in speed. Should not introduce any bugs.
CCMAIL: kstars-devel at kde.org
M +6 -5 kstars/skycomponents/starcomponent.cpp
http://commits.kde.org/kstars/7fa00fcda6ba7758d810cf205776ca2698c21b61
diff --git a/kstars/skycomponents/starcomponent.cpp b/kstars/skycomponents/starcomponent.cpp
index 7d0a140..1ba1285 100644
--- a/kstars/skycomponents/starcomponent.cpp
+++ b/kstars/skycomponents/starcomponent.cpp
@@ -285,20 +285,21 @@ void StarComponent::draw( SkyPainter *skyp )
++nTrixels;
Trixel currentRegion = region.next();
StarList* starList = m_starIndex->at( currentRegion );
+
for (int i=0; i < starList->size(); ++i) {
StarObject *curStar = starList->at( i );
if( !curStar )
continue;
-
- if ( curStar->updateID != updateID )
- curStar->JITupdate( data );
-
+
float mag = curStar->mag();
-
+
// break loop if maglim is reached
if ( mag > maglim || ( hideFaintStars && curStar->mag() > hideStarsMag ) )
break;
+ if ( curStar->updateID != updateID )
+ curStar->JITupdate( data );
+
bool drawn = skyp->drawPointSource( curStar, mag, curStar->spchar() );
//FIXME_SKYPAINTER: find a better way to do this.
More information about the Kstars-devel
mailing list