diff options
author | Bruno de Oliveira Abinader <bruno@mapbox.com> | 2015-07-14 18:59:46 +0300 |
---|---|---|
committer | Bruno de Oliveira Abinader <bruno@mapbox.com> | 2015-07-20 18:14:24 +0300 |
commit | 51403b3c8b28c399eb5c64a3e9d99df978d23931 (patch) | |
tree | 7b8a63db9eaa6be6f443cde3a2199b53df4f7fe3 /src | |
parent | 263f9fad308873077b9287dd8aeab089fc415b10 (diff) | |
download | qtlocation-mapboxgl-51403b3c8b28c399eb5c64a3e9d99df978d23931.tar.gz |
Cleaned up FrameHistory
Diffstat (limited to 'src')
-rw-r--r-- | src/mbgl/renderer/frame_history.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/mbgl/renderer/frame_history.cpp b/src/mbgl/renderer/frame_history.cpp index cb36a1d834..73336c029f 100644 --- a/src/mbgl/renderer/frame_history.cpp +++ b/src/mbgl/renderer/frame_history.cpp @@ -23,11 +23,11 @@ bool FrameHistory::needsAnimation(const Duration& duration) const { // If we have a value that is older than duration and whose z value is the // same as the most current z value, and if all values inbetween have the // same z value, we don't need animation, otherwise we probably do. - const FrameSnapshot &pivot = history.back(); + const FrameSnapshot& pivot = history.back(); int i = -1; while ((int)history.size() > i + 1 && history[i + 1].now + duration < pivot.now) { - i++; + ++i; } if (i < 0) { @@ -38,7 +38,7 @@ bool FrameHistory::needsAnimation(const Duration& duration) const { // Make sure that all subsequent snapshots have the same zoom as the last // pivot element. - for (; (int)history.size() > i; i++) { + for (; (int)history.size() > i; ++i) { if (history[i].z != pivot.z) { return true; } |