summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDennis Nienhüser <[email protected]>2015-06-01 15:34:54 +0200
committerDennis Nienhüser <[email protected]>2015-06-01 15:36:40 +0200
commite97b194c09a13750b4785b45745fbc11b65cf54b (patch)
treee761f208bccac9b25ae5bcd3b34a936b4b79cc23
parent5ba7bfb9d8885be19c5e235968cb66311fd37172 (diff)
Move static const member initialization out of class scope
To compile with C++ 11, those would need to be changed to static constexpr with in-class initialization; MSVC 10 however does not know about constexpr
-rw-r--r--src/lib/marble/geodata/data/GeoDataCoordinates.cpp4
-rw-r--r--src/lib/marble/geodata/data/GeoDataCoordinates_p.h8
2 files changed, 8 insertions, 4 deletions
diff --git a/src/lib/marble/geodata/data/GeoDataCoordinates.cpp b/src/lib/marble/geodata/data/GeoDataCoordinates.cpp
index c3e04fa..0c72dc9 100644
--- a/src/lib/marble/geodata/data/GeoDataCoordinates.cpp
+++ b/src/lib/marble/geodata/data/GeoDataCoordinates.cpp
@@ -580,6 +580,10 @@ bool LonLatParser::isCorrectDirections(const QString& dir1, const QString& dir2,
isLonDirection(dir2, isLonDirPosHemisphere));
}
+const qreal GeoDataCoordinatesPrivate::sm_semiMajorAxis = 6378137.0;
+const qreal GeoDataCoordinatesPrivate::sm_semiMinorAxis = 6356752.314;
+const qreal GeoDataCoordinatesPrivate::sm_eccentricitySquared = 6.69437999013e-03;
+const qreal GeoDataCoordinatesPrivate::sm_utmScaleFactor = 0.9996;
GeoDataCoordinates::Notation GeoDataCoordinates::s_notation = GeoDataCoordinates::DMS;
const GeoDataCoordinates GeoDataCoordinates::null = GeoDataCoordinates( 0, 0, 0 ); // don't use default constructor!
diff --git a/src/lib/marble/geodata/data/GeoDataCoordinates_p.h b/src/lib/marble/geodata/data/GeoDataCoordinates_p.h
index cc5886f..787b19f 100644
--- a/src/lib/marble/geodata/data/GeoDataCoordinates_p.h
+++ b/src/lib/marble/geodata/data/GeoDataCoordinates_p.h
@@ -209,10 +209,10 @@ class GeoDataCoordinatesPrivate
QAtomicInt ref;
/* UTM Ellipsoid model constants (actual values here are for WGS84) */
- static const qreal sm_semiMajorAxis = 6378137.0;
- static const qreal sm_semiMinorAxis = 6356752.314;
- static const qreal sm_eccentricitySquared = 6.69437999013e-03;
- static const qreal sm_utmScaleFactor = 0.9996;
+ static const qreal sm_semiMajorAxis;
+ static const qreal sm_semiMinorAxis;
+ static const qreal sm_eccentricitySquared;
+ static const qreal sm_utmScaleFactor;
};