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

Unified Diff: third_party/WebKit/Source/core/xml/XPathParser.cpp

Issue 2560823003: Avoid WTF::Vector::at() and operator[] in core/xml. (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
« no previous file with comments | « third_party/WebKit/Source/core/xml/XPathNodeSet.h ('k') | third_party/WebKit/Source/core/xml/XPathPath.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/xml/XPathParser.cpp
diff --git a/third_party/WebKit/Source/core/xml/XPathParser.cpp b/third_party/WebKit/Source/core/xml/XPathParser.cpp
index 28a64bf3e1c2fadaa7388872bf080af43640db20..c4814389145262e77c5a30a4b5c45094a3e55686 100644
--- a/third_party/WebKit/Source/core/xml/XPathParser.cpp
+++ b/third_party/WebKit/Source/core/xml/XPathParser.cpp
@@ -85,8 +85,8 @@ static void setUpAxisNamesMap(AxisNamesMap& axisNames) {
{"preceding", Step::PrecedingAxis},
{"preceding-sibling", Step::PrecedingSiblingAxis},
{"self", Step::SelfAxis}};
- for (unsigned i = 0; i < sizeof(axisNameList) / sizeof(axisNameList[0]); ++i)
- axisNames.set(axisNameList[i].name, axisNameList[i].axis);
+ for (const auto& axisName : axisNameList)
+ axisNames.set(axisName.name, axisName.axis);
}
static bool isAxisName(const String& name, Step::Axis& type) {
« no previous file with comments | « third_party/WebKit/Source/core/xml/XPathNodeSet.h ('k') | third_party/WebKit/Source/core/xml/XPathPath.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698