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

Side by Side 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 unified diff | 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 »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * This file is part of the XSL implementation. 2 * This file is part of the XSL implementation.
3 * 3 *
4 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple, Inc. All rights reserved. 4 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple, Inc. All rights reserved.
5 * Copyright (C) 2005, 2006 Alexey Proskuryakov <ap@webkit.org> 5 * Copyright (C) 2005, 2006 Alexey Proskuryakov <ap@webkit.org>
6 * 6 *
7 * This library is free software; you can redistribute it and/or 7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Library General Public 8 * modify it under the terms of the GNU Library General Public
9 * License as published by the Free Software Foundation; either 9 * License as published by the Free Software Foundation; either
10 * version 2 of the License, or (at your option) any later version. 10 * version 2 of the License, or (at your option) any later version.
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after
187 return true; 187 return true;
188 } 188 }
189 189
190 static const char** xsltParamArrayFromParameterMap(XSLTProcessor::ParameterMap& parameters) 190 static const char** xsltParamArrayFromParameterMap(XSLTProcessor::ParameterMap& parameters)
191 { 191 {
192 if (parameters.isEmpty()) 192 if (parameters.isEmpty())
193 return 0; 193 return 0;
194 194
195 const char** parameterArray = static_cast<const char**>(fastMalloc(((paramet ers.size() * 2) + 1) * sizeof(char*))); 195 const char** parameterArray = static_cast<const char**>(fastMalloc(((paramet ers.size() * 2) + 1) * sizeof(char*)));
196 196
197 XSLTProcessor::ParameterMap::iterator end = parameters.end();
198 unsigned index = 0; 197 unsigned index = 0;
199 for (XSLTProcessor::ParameterMap::iterator it = parameters.begin(); it != en d; ++it) { 198 for (auto& parameter : parameters) {
200 parameterArray[index++] = fastStrDup(it->key.utf8().data()); 199 parameterArray[index++] = fastStrDup(parameter.key.utf8().data());
201 parameterArray[index++] = fastStrDup(it->value.utf8().data()); 200 parameterArray[index++] = fastStrDup(parameter.value.utf8().data());
202 } 201 }
203 parameterArray[index] = 0; 202 parameterArray[index] = 0;
204 203
205 return parameterArray; 204 return parameterArray;
206 } 205 }
207 206
208 static void freeXsltParamArray(const char** params) 207 static void freeXsltParamArray(const char** params)
209 { 208 {
210 const char** temp = params; 209 const char** temp = params;
211 if (!params) 210 if (!params)
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
345 344
346 sheet->method = origMethod; 345 sheet->method = origMethod;
347 setXSLTLoadCallBack(0, 0, 0); 346 setXSLTLoadCallBack(0, 0, 0);
348 xsltFreeStylesheet(sheet); 347 xsltFreeStylesheet(sheet);
349 m_stylesheet = nullptr; 348 m_stylesheet = nullptr;
350 349
351 return success; 350 return success;
352 } 351 }
353 352
354 } // namespace blink 353 } // namespace blink
OLDNEW
« 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