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

Unified Diff: third_party/WebKit/Source/core/dom/CompositorProxy.cpp

Issue 2553343002: Avoid WTF::Vector::at() and operator[] in core/dom. (Closed)
Patch Set: Created 4 years 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
Index: third_party/WebKit/Source/core/dom/CompositorProxy.cpp
diff --git a/third_party/WebKit/Source/core/dom/CompositorProxy.cpp b/third_party/WebKit/Source/core/dom/CompositorProxy.cpp
index d419c254f9fcd717d15977de6207541179122e2b..a10bd04a4ce429c33c94360da431956a69a58e2f 100644
--- a/third_party/WebKit/Source/core/dom/CompositorProxy.cpp
+++ b/third_party/WebKit/Source/core/dom/CompositorProxy.cpp
@@ -98,10 +98,8 @@ static uint32_t compositorMutablePropertiesFromNames(
static bool sanityCheckMutableProperties(uint32_t properties) {
// Ensures that we only have bits set for valid mutable properties.
uint32_t sanityCheckProperties = properties;
- for (unsigned i = 0; i < WTF_ARRAY_LENGTH(allowedProperties); ++i) {
- sanityCheckProperties &=
- ~static_cast<uint32_t>(allowedProperties[i].property);
- }
+ for (const auto& property : allowedProperties)
+ sanityCheckProperties &= ~static_cast<uint32_t>(property.property);
return !sanityCheckProperties;
}
#endif
« no previous file with comments | « third_party/WebKit/Source/core/dom/ClientRectList.cpp ('k') | third_party/WebKit/Source/core/dom/DOMStringList.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698