summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDennis Nienhüser <nienhueser@kde.org>2016-10-22 13:13:47 (GMT)
committerFriedrich W. H. Kossebau <kossebau@kde.org>2016-11-05 16:47:11 (GMT)
commit1d5a7eb190deaefcd51689aa089aea8ac8667ff4 (patch)
tree1e7411d6d63c6dedf345516ab6e0e70a634c2fa9
parentac2660dd2fc7ef85db47f9a06fe9b144d51c7536 (diff)
Provider faster implementations of the default case (radian unit)
-rw-r--r--src/lib/marble/geodata/data/GeoDataCoordinates.cpp13
-rw-r--r--src/lib/marble/geodata/data/GeoDataCoordinates.h10
2 files changed, 17 insertions, 6 deletions
diff --git a/src/lib/marble/geodata/data/GeoDataCoordinates.cpp b/src/lib/marble/geodata/data/GeoDataCoordinates.cpp
index c4b1cdc..32e161c 100644
--- a/src/lib/marble/geodata/data/GeoDataCoordinates.cpp
+++ b/src/lib/marble/geodata/data/GeoDataCoordinates.cpp
@@ -179,6 +179,12 @@ void GeoDataCoordinates::geoCoordinates( qreal& lon, qreal& lat,
}
}
+void GeoDataCoordinates::geoCoordinates(qreal &lon, qreal &lat) const
+{
+ lon = d->m_lon;
+ lat = d->m_lat;
+}
+
void GeoDataCoordinates::geoCoordinates( qreal& lon, qreal& lat, qreal& alt,
GeoDataCoordinates::Unit unit ) const
{
@@ -186,6 +192,13 @@ void GeoDataCoordinates::geoCoordinates( qreal& lon, qreal& lat, qreal& alt,
alt = d->m_altitude;
}
+void GeoDataCoordinates::geoCoordinates(qreal &lon, qreal &lat, qreal &alt) const
+{
+ lon = d->m_lon;
+ lat = d->m_lat;
+ alt = d->m_altitude;
+}
+
qreal GeoDataCoordinates::longitude( GeoDataCoordinates::Unit unit ) const
{
switch ( unit )
diff --git a/src/lib/marble/geodata/data/GeoDataCoordinates.h b/src/lib/marble/geodata/data/GeoDataCoordinates.h
index fb57077..075bd0d 100644
--- a/src/lib/marble/geodata/data/GeoDataCoordinates.h
+++ b/src/lib/marble/geodata/data/GeoDataCoordinates.h
@@ -157,9 +157,8 @@ class GEODATA_EXPORT GeoDataCoordinates
* @param unit units that lon and lat get measured in
* (default for Radian: north pole at pi/2, southpole at -pi/2)
*/
- void geoCoordinates( qreal& lon, qreal& lat,
- GeoDataCoordinates::Unit unit = GeoDataCoordinates::Radian )
- const;
+ void geoCoordinates(qreal& lon, qreal& lat, GeoDataCoordinates::Unit unit) const;
+ void geoCoordinates(qreal& lon, qreal& lat) const;
/**
* @brief use this function to get the longitude, latitude and altitude
@@ -170,9 +169,8 @@ class GEODATA_EXPORT GeoDataCoordinates
* @param unit units that lon and lat get measured in
* (default for Radian: north pole at pi/2, southpole at -pi/2)
*/
- void geoCoordinates( qreal& lon, qreal& lat, qreal& alt,
- GeoDataCoordinates::Unit unit = GeoDataCoordinates::Radian )
- const;
+ void geoCoordinates(qreal& lon, qreal& lat, qreal& alt, GeoDataCoordinates::Unit unit) const;
+ void geoCoordinates(qreal& lon, qreal& lat, qreal& alt) const;
/**
* @brief set the longitude in a GeoDataCoordinates object