From 98cbc0bf2267996c049c516338223a8ad167ad6d Mon Sep 17 00:00:00 2001 From: kshalnev Date: Thu, 3 Dec 2015 21:53:59 +0300 Subject: [PATCH] Init GpsTrackInfo from GpsInfo --- platform/location.hpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/platform/location.hpp b/platform/location.hpp index 94ffb16015..f068b213e7 100644 --- a/platform/location.hpp +++ b/platform/location.hpp @@ -69,6 +69,20 @@ namespace location double m_latitude; //!< degrees double m_longitude; //!< degrees double m_speed; //!< meters per second + + GpsTrackInfo() = default; + GpsTrackInfo(GpsTrackInfo const &) = default; + GpsTrackInfo & operator=(GpsTrackInfo const &) = default; + GpsTrackInfo(GpsInfo const & info) + : m_timestamp(info.m_timestamp) + , m_latitude(info.m_latitude) + , m_longitude(info.m_longitude) + , m_speed(info.m_speed) + {} + GpsTrackInfo & operator=(GpsInfo const & info) + { + return operator=(GpsTrackInfo(info)); + } }; class CompassInfo