[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    KDE/kdeedu/marble
From:       Inge Wallin <inge () lysator ! liu ! se>
Date:       2007-07-31 20:54:12
Message-ID: 1185915252.869211.584.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 694824 by ingwa:

Fix krazy issue 14: inline methods in public classes

 M  +6 -0      ChangeLog  
 M  +9 -12     src/lib/GridMap.cpp  
 M  +0 -2      src/lib/GridMap.h  
 M  +6 -11     src/lib/vectormap.cpp  
 M  +0 -1      src/lib/vectormap.h  


--- trunk/KDE/kdeedu/marble/ChangeLog #694823:694824
@@ -1,5 +1,11 @@
 2007-07-31  Inge Wallin  <inge@lysator.liu.se>
 
+	Fix krazy issue 14: inline methods in public classes
+	* src/lib/GridMap.{h,cpp} (initCrossHorizon): Remove function and
+	put in the code, since it was only used once..
+	* src/lib/vectormap.{h,cpp} (initCrossHorizon): Remove function
+	and put in the code, since it was only used once..
+
 	Cleaning, according to the TODO file.
 	* src/lib/maptheme.cpp: Clean (not many changes, really)
 
--- trunk/KDE/kdeedu/marble/src/lib/GridMap.cpp #694823:694824
@@ -211,9 +211,16 @@
             m_lastVisible = m_currentlyVisible;
             m_currentlyVisible = (qpos.v[Q_Z] >= 0) ? true : false;
 
-            if ( j == 0 )
-                initCrossHorizon();
+            // Initialize crossing of the horizon.
+            if ( j == 0 ) {
 
+                m_lastVisible = m_currentlyVisible;
+
+                // Initially m_lastPoint MUST NOT equal m_currentPoint
+                m_lastPoint = QPointF( m_currentPoint.x() + 1.0, 
+                                       m_currentPoint.y() + 1.0 );
+            }
+
             if (m_currentlyVisible != m_lastVisible) {
                 m_polygon << horizonPoint();
 
@@ -301,16 +308,6 @@
 }
 
 
-void GridMap::initCrossHorizon()
-{
-    m_lastVisible = m_currentlyVisible;
-
-    // Initially m_lastPoint MUST NOT equal m_currentPoint
-    m_lastPoint = QPointF( m_currentPoint.x() + 1.0, 
-                           m_currentPoint.y() + 1.0 );
-}
-
-
 const QPointF GridMap::horizonPoint()
 {
     // qDebug("Interpolating");
--- trunk/KDE/kdeedu/marble/src/lib/GridMap.h #694823:694824
@@ -47,8 +47,6 @@
     void createCircles( int lngNum, int latNum );
     void createCircle( double, SphereDim, double cutCoeff = 0.0 );
 
-    inline void initCrossHorizon();
-
     const QPointF horizonPoint();
 
  private:
--- trunk/KDE/kdeedu/marble/src/lib/vectormap.cpp #694823:694824
@@ -215,7 +215,12 @@
             // currentlyvisible = (qpos.v[Q_Z] >= m_zPointLimit) ? true : false;
             m_currentlyvisible = ( qpos.v[Q_Z] >= 0 ) ? true : false;
             if ( itPoint == itStartPoint ) {
-                initCrossHorizon();
+                // qDebug("Initializing scheduled new PolyLine");
+                m_lastvisible  = m_currentlyvisible;
+                m_lastPoint    = QPointF( m_currentPoint.x() + 1.0, 
+                                          m_currentPoint.y() + 1.0 );
+                m_horizonpair  = false;
+                m_firsthorizon = false;
             }
             if ( m_currentlyvisible != m_lastvisible )
                 manageCrossHorizon();
@@ -370,16 +375,6 @@
 }
 
 
-void VectorMap::initCrossHorizon()
-{
-    // qDebug("Initializing scheduled new PolyLine");
-    m_lastvisible  = m_currentlyvisible;
-    m_lastPoint    = QPointF( m_currentPoint.x() + 1, m_currentPoint.y() + 1 );
-    m_horizonpair  = false;
-    m_firsthorizon = false;
-}
-
-
 void VectorMap::manageCrossHorizon()
 {
     // qDebug("Crossing horizon line");
--- trunk/KDE/kdeedu/marble/src/lib/vectormap.h #694823:694824
@@ -55,7 +55,6 @@
     void createPolyLine( GeoPoint::Vector::ConstIterator, 
                          GeoPoint::Vector::ConstIterator, const int);
 
-    inline void    initCrossHorizon();
     void           manageCrossHorizon();
     const QPointF  horizonPoint();
     void           createArc();
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic