Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1019)

Unified Diff: Source/core/platform/animation/TimingFunction.h

Issue 47623002: Fix more warnings on linux (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fix RenderImage.cpp. Created 7 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/html/canvas/WebGLRenderingContext.cpp ('k') | Source/core/platform/graphics/WidthCache.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/platform/animation/TimingFunction.h
diff --git a/Source/core/platform/animation/TimingFunction.h b/Source/core/platform/animation/TimingFunction.h
index 39ce2b40bfc6523cd492ae701eefefc41c698288..342925772719f6112f7767545cc02fe44402e40d 100644
--- a/Source/core/platform/animation/TimingFunction.h
+++ b/Source/core/platform/animation/TimingFunction.h
@@ -274,11 +274,10 @@ public:
RELEASE_ASSERT_WITH_MESSAGE(fraction >= 0 && fraction <= 1, "Web Animations not yet implemented: Timing function behavior outside the range [0, 1] is not yet specified");
ASSERT(!m_segments.isEmpty());
ASSERT(m_segments.last().max() == 1);
- const Segment* segment;
- for (size_t i = 0; i < m_segments.size(); ++i) {
- segment = &m_segments[i];
- if (fraction < segment->max())
- break;
+ size_t i = 0;
+ const Segment* segment = &m_segments[i++];
+ while (fraction >= segment->max() && i < m_segments.size()) {
+ segment = &m_segments[i++];
}
return segment->evaluate(fraction, accuracy);
}
« no previous file with comments | « Source/core/html/canvas/WebGLRenderingContext.cpp ('k') | Source/core/platform/graphics/WidthCache.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698