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

Unified Diff: Source/core/xml/XSLTProcessorLibxslt.cpp

Issue 781673002: Use C++11 range-based loop for core/xml and core/loader (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: remove unnecessary curly brackets Created 5 years, 11 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/xml/XPathStep.cpp ('k') | Source/core/xml/parser/XMLDocumentParser.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/xml/XSLTProcessorLibxslt.cpp
diff --git a/Source/core/xml/XSLTProcessorLibxslt.cpp b/Source/core/xml/XSLTProcessorLibxslt.cpp
index a2ee29434a3cd926d346d49621db6652f699a372..b62b7c3fb161b0dd14163578fa137d770e7ebf40 100644
--- a/Source/core/xml/XSLTProcessorLibxslt.cpp
+++ b/Source/core/xml/XSLTProcessorLibxslt.cpp
@@ -194,11 +194,10 @@ static const char** xsltParamArrayFromParameterMap(XSLTProcessor::ParameterMap&
const char** parameterArray = static_cast<const char**>(fastMalloc(((parameters.size() * 2) + 1) * sizeof(char*)));
- XSLTProcessor::ParameterMap::iterator end = parameters.end();
unsigned index = 0;
- for (XSLTProcessor::ParameterMap::iterator it = parameters.begin(); it != end; ++it) {
- parameterArray[index++] = fastStrDup(it->key.utf8().data());
- parameterArray[index++] = fastStrDup(it->value.utf8().data());
+ for (auto& parameter : parameters) {
+ parameterArray[index++] = fastStrDup(parameter.key.utf8().data());
+ parameterArray[index++] = fastStrDup(parameter.value.utf8().data());
}
parameterArray[index] = 0;
« no previous file with comments | « Source/core/xml/XPathStep.cpp ('k') | Source/core/xml/parser/XMLDocumentParser.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698