summaryrefslogtreecommitdiff
path: root/xmlreader
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2016-05-12 10:07:50 +0200
committerNoel Grandin <noelgrandin@gmail.com>2016-05-13 08:09:03 +0000
commit96fab0513215cc416e96e1b2089466afd0d2791c (patch)
tree7c03bd56b0c3744f0560c05ebb2f422155e64543 /xmlreader
parentb3d5da663ff09c72455a8d3bf9be7c00220271bb (diff)
clang-tidy modernize-loop-convert in writerfilter to xmlsecurity
Change-Id: I334411c6b57c028ffb41b5deb72002f9d54038c3 Reviewed-on: https://gerrit.libreoffice.org/24923 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'xmlreader')
-rw-r--r--xmlreader/source/xmlreader.cxx10
1 files changed, 5 insertions, 5 deletions
diff --git a/xmlreader/source/xmlreader.cxx b/xmlreader/source/xmlreader.cxx
index 1a4da841b449..5f4e506771fb 100644
--- a/xmlreader/source/xmlreader.cxx
+++ b/xmlreader/source/xmlreader.cxx
@@ -487,14 +487,14 @@ char const * XmlReader::handleReference(char const * position, char const * end)
RTL_CONSTASCII_STRINGPARAM("'") },
{ RTL_CONSTASCII_STRINGPARAM("quot;"),
RTL_CONSTASCII_STRINGPARAM("\"") } };
- for (std::size_t i = 0; i < SAL_N_ELEMENTS(refs); ++i) {
+ for (const auto & ref : refs) {
if (rtl_str_shortenedCompare_WithLength(
- position, end - position, refs[i].inBegin, refs[i].inLength,
- refs[i].inLength) ==
+ position, end - position, ref.inBegin, ref.inLength,
+ ref.inLength) ==
0)
{
- position += refs[i].inLength;
- pad_.add(refs[i].outBegin, refs[i].outLength);
+ position += ref.inLength;
+ pad_.add(ref.outBegin, ref.outLength);
return position;
}
}