diff options
author | Noel Grandin <noel@peralex.com> | 2016-05-05 10:10:54 +0200 |
---|---|---|
committer | Noel Grandin <noelgrandin@gmail.com> | 2016-05-05 12:44:25 +0000 |
commit | f07ff7ed8a23b4982ed9cd7d9e2083c9d0928384 (patch) | |
tree | 636c69f83d25d0bfe540322b24dcbe3779c6b9b7 /sax | |
parent | 931a72efbc8708fab91e849b39a84e6b7939c7de (diff) |
clang-tidy modernize-loop-convert in oox to sax
Change-Id: If0d87b6679765fc6d1f9300c6972845cf3742b9c
Reviewed-on: https://gerrit.libreoffice.org/24674
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'sax')
-rw-r--r-- | sax/source/tools/fastattribs.cxx | 4 | ||||
-rw-r--r-- | sax/source/tools/fastserializer.cxx | 6 |
2 files changed, 5 insertions, 5 deletions
diff --git a/sax/source/tools/fastattribs.cxx b/sax/source/tools/fastattribs.cxx index b94b705fbf32..e9ae452a7aca 100644 --- a/sax/source/tools/fastattribs.cxx +++ b/sax/source/tools/fastattribs.cxx @@ -120,8 +120,8 @@ void FastAttributeList::addUnknown( const OString& rName, const OString& value ) // XFastAttributeList sal_Bool FastAttributeList::hasAttribute( ::sal_Int32 Token ) throw (RuntimeException, std::exception) { - for (size_t i = 0; i < maAttributeTokens.size(); ++i) - if (maAttributeTokens[i] == Token) + for (sal_Int32 i : maAttributeTokens) + if (i == Token) return true; return false; diff --git a/sax/source/tools/fastserializer.cxx b/sax/source/tools/fastserializer.cxx index 70f739733c89..49ed24b8e644 100644 --- a/sax/source/tools/fastserializer.cxx +++ b/sax/source/tools/fastserializer.cxx @@ -255,11 +255,11 @@ namespace sax_fastparser { #ifdef DBG_UTIL ::std::set<OString> DebugAttributes; #endif - for (size_t j = 0; j < maTokenValues.size(); j++) + for (const TokenValue & rTokenValue : maTokenValues) { writeBytes(sSpace, N_CHARS(sSpace)); - sal_Int32 nToken = maTokenValues[j].nToken; + sal_Int32 nToken = rTokenValue.nToken; writeId(nToken); #ifdef DBG_UTIL @@ -271,7 +271,7 @@ namespace sax_fastparser { writeBytes(sEqualSignAndQuote, N_CHARS(sEqualSignAndQuote)); - write(maTokenValues[j].pValue, -1, true); + write(rTokenValue.pValue, -1, true); writeBytes(sQuote, N_CHARS(sQuote)); } |