From 51403b3c8b28c399eb5c64a3e9d99df978d23931 Mon Sep 17 00:00:00 2001 From: Bruno de Oliveira Abinader Date: Tue, 14 Jul 2015 18:59:46 +0300 Subject: [PATCH] Cleaned up FrameHistory --- src/mbgl/renderer/frame_history.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/mbgl/renderer/frame_history.cpp b/src/mbgl/renderer/frame_history.cpp index cb36a1d83..73336c029 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; }