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

List:       kde-commits
Subject:    [digikam] core/utilities/geolocation/editor/kmlexport: fix cppcheck warnings
From:       Human Dynamo <null () kde ! org>
Date:       2018-05-17 5:20:57
Message-ID: E1fJBLV-0008QS-TD () code ! kde ! org
[Download RAW message or body]

Git commit 490545cb8cd7d02f969f1fd1ec5a4916b868181b by Human Dynamo.
Committed on 17/05/2018 at 05:20.
Pushed by cgilles into branch 'master'.

fix cppcheck warnings

M  +8    -6    core/utilities/geolocation/editor/kmlexport/geodatacontainer.h

https://commits.kde.org/digikam/490545cb8cd7d02f969f1fd1ec5a4916b868181b

diff --git a/core/utilities/geolocation/editor/kmlexport/geodatacontainer.h \
b/core/utilities/geolocation/editor/kmlexport/geodatacontainer.h index \
                501c8e1571..429ce66b0c 100644
--- a/core/utilities/geolocation/editor/kmlexport/geodatacontainer.h
+++ b/core/utilities/geolocation/editor/kmlexport/geodatacontainer.h
@@ -41,8 +41,10 @@ public:
     {
     };
 
-    GeoDataContainer(double altitude, double latitude,
-                     double longitude, bool interpolated)
+    GeoDataContainer(double altitude,
+                     double latitude,
+                     double longitude,
+                     bool interpolated)
         : m_interpolated(interpolated),
           m_altitude(altitude),
           m_latitude(latitude),
@@ -60,6 +62,7 @@ public:
         m_altitude     = data.altitude();
         m_latitude     = data.latitude();
         m_longitude    = data.longitude();
+
         return *this;
     };
 
@@ -67,8 +70,8 @@ public:
     // same value for m_interpolated
     bool sameCoordinatesAs(const GeoDataContainer& a) const
     {
-        return ( a.m_altitude == m_altitude ) &&
-               ( a.m_latitude == m_latitude ) &&
+        return ( a.m_altitude  == m_altitude ) &&
+               ( a.m_latitude  == m_latitude ) &&
                ( a.m_longitude == m_longitude);
     }
 
@@ -116,9 +119,8 @@ public:
         {
             bool okay          = true;
             double ptLongitude = 0.0;
-            double ptLatitude  = 0.0;
             double ptAltitude  = 0.0;
-            ptLatitude         = parts[0].toDouble(&okay);
+            double ptLatitude  = parts[0].toDouble(&okay);
 
             if (okay)
                 ptLongitude = parts[1].toDouble(&okay);


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

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