diff options
author | Vladimir Byko-Ianko <v.bykoianko@corp.mail.ru> | 2016-12-02 06:57:57 +0300 |
---|---|---|
committer | Vladimir Byko-Ianko <v.bykoianko@corp.mail.ru> | 2016-12-03 11:55:31 +0300 |
commit | fd74ef61df978175ae84602b61bb62a8a987ab9f (patch) | |
tree | 943625466212a5179f9f007e46afe01727d92bc4 /traffic | |
parent | 2c19e2178484009edd8fb2a2d9063fa6a3d32dd7 (diff) |
Using move semantics for passing traffic jam info to routing.
Diffstat (limited to 'traffic')
-rw-r--r-- | traffic/traffic_info.hpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/traffic/traffic_info.hpp b/traffic/traffic_info.hpp index af257c17f9..acf35efa3e 100644 --- a/traffic/traffic_info.hpp +++ b/traffic/traffic_info.hpp @@ -68,6 +68,8 @@ public: TrafficInfo(MwmSet::MwmId const & mwmId, int64_t currentDataVersion); + TrafficInfo(TrafficInfo && info) : m_coloring(move(info.m_coloring)), m_mwmId(info.m_mwmId) {} + void SetColoringForTesting(Coloring & coloring) { m_coloring = coloring; } // Fetches the latest traffic data from the server and updates the coloring. // Construct the url by passing an MwmId. @@ -99,7 +101,7 @@ public: virtual ~TrafficObserver() = default; virtual void OnTrafficEnabled(bool enable) = 0; - virtual void OnTrafficInfoAdded(traffic::TrafficInfo const & info) = 0; + virtual void OnTrafficInfoAdded(traffic::TrafficInfo && info) = 0; virtual void OnTrafficInfoRemoved(MwmSet::MwmId const & mwmId) = 0; }; |