summaryrefslogtreecommitdiff
path: root/xmlreader/source
diff options
context:
space:
mode:
authorNoel Grandin <noelgrandin@gmail.com>2016-03-28 17:12:04 +0200
committerNoel Grandin <noelgrandin@gmail.com>2016-03-31 08:00:13 +0000
commit1aa4df615fa5599d05e9dd5e925b5852676185fa (patch)
tree1f637fa13140941a5775c91f058d0742f911693f /xmlreader/source
parent2bd1e7aafeebdfe0e1656ed1ff01762039be5af1 (diff)
use SAL_N_ELEMENTS in for loops
for with git grep -n 'for.*sizeof' Change-Id: I6211024385e03ac5eeeb38690d2c1c699e015c2f Reviewed-on: https://gerrit.libreoffice.org/23569 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'xmlreader/source')
-rw-r--r--xmlreader/source/xmlreader.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/xmlreader/source/xmlreader.cxx b/xmlreader/source/xmlreader.cxx
index 25b56847f692..18a6d41e7820 100644
--- a/xmlreader/source/xmlreader.cxx
+++ b/xmlreader/source/xmlreader.cxx
@@ -488,7 +488,7 @@ 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 < sizeof refs / sizeof refs[0]; ++i) {
+ for (std::size_t i = 0; i < SAL_N_ELEMENTS(refs); ++i) {
if (rtl_str_shortenedCompare_WithLength(
position, end - position, refs[i].inBegin, refs[i].inLength,
refs[i].inLength) ==