diff options
author | Bruno de Oliveira Abinader <bruno@mapbox.com> | 2015-07-13 15:15:50 +0300 |
---|---|---|
committer | Bruno de Oliveira Abinader <bruno@mapbox.com> | 2015-07-14 16:48:34 +0300 |
commit | 2aad2f4e14ab762847141788e725d50e1ee44ace (patch) | |
tree | 5f814850425b8bc0908a2c9de04916c1f85e22e1 /src/mbgl/renderer/frame_history.hpp | |
parent | 7d8b4dc6c0714aa43a85a56ea32fa5590dd843e6 (diff) | |
download | qtlocation-mapboxgl-2aad2f4e14ab762847141788e725d50e1ee44ace.tar.gz |
Pass {Duration,TimePoint} by const ref if possible
Diffstat (limited to 'src/mbgl/renderer/frame_history.hpp')
-rw-r--r-- | src/mbgl/renderer/frame_history.hpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/mbgl/renderer/frame_history.hpp b/src/mbgl/renderer/frame_history.hpp index 15ca92e469..ef52b2a5ec 100644 --- a/src/mbgl/renderer/frame_history.hpp +++ b/src/mbgl/renderer/frame_history.hpp @@ -11,8 +11,8 @@ namespace mbgl { struct FrameSnapshot { - explicit inline FrameSnapshot(TimePoint now_, float z_) : now(now_), z(z_) {} - TimePoint now; + explicit inline FrameSnapshot(const TimePoint& now_, float z_) : now(now_), z(z_) {} + const TimePoint now; float z; }; @@ -26,10 +26,10 @@ struct FadeProperties { class FrameHistory { public: // Record frame history that will be used to calculate fading params - void record(TimePoint now, float zoom); + void record(const TimePoint& now, float zoom); - bool needsAnimation(Duration) const; - FadeProperties getFadeProperties(Duration); + bool needsAnimation(const Duration& duration) const; + FadeProperties getFadeProperties(const Duration& duration); public: std::deque<FrameSnapshot> history; |