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

Unified Diff: Source/core/css/CSSCanvasValue.cpp

Issue 645743003: Use C++11 range-based loop for core/css (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: better variable names Created 6 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 | « no previous file | Source/core/css/CSSComputedStyleDeclaration.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/css/CSSCanvasValue.cpp
diff --git a/Source/core/css/CSSCanvasValue.cpp b/Source/core/css/CSSCanvasValue.cpp
index b01502419962f2f04e56676da17ffcdfad6994a4..9d35c9db77b7c6e5428d5411df64ed95e39963fd 100644
--- a/Source/core/css/CSSCanvasValue.cpp
+++ b/Source/core/css/CSSCanvasValue.cpp
@@ -51,16 +51,14 @@ String CSSCanvasValue::customCSSText() const
void CSSCanvasValue::canvasChanged(HTMLCanvasElement*, const FloatRect& changedRect)
{
IntRect imageChangeRect = enclosingIntRect(changedRect);
- RenderObjectSizeCountMap::const_iterator end = clients().end();
- for (RenderObjectSizeCountMap::const_iterator curr = clients().begin(); curr != end; ++curr)
- const_cast<RenderObject*>(curr->key)->imageChanged(static_cast<WrappedImagePtr>(this), &imageChangeRect);
+ for (const auto& curr : clients())
+ const_cast<RenderObject*>(curr.key)->imageChanged(static_cast<WrappedImagePtr>(this), &imageChangeRect);
}
void CSSCanvasValue::canvasResized(HTMLCanvasElement*)
{
- RenderObjectSizeCountMap::const_iterator end = clients().end();
- for (RenderObjectSizeCountMap::const_iterator curr = clients().begin(); curr != end; ++curr)
- const_cast<RenderObject*>(curr->key)->imageChanged(static_cast<WrappedImagePtr>(this));
+ for (const auto& curr : clients())
+ const_cast<RenderObject*>(curr.key)->imageChanged(static_cast<WrappedImagePtr>(this));
}
#if !ENABLE(OILPAN)
« no previous file with comments | « no previous file | Source/core/css/CSSComputedStyleDeclaration.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698