diff options
author | Caolán McNamara <caolanm@redhat.com> | 2010-12-22 13:43:24 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2010-12-22 13:43:24 +0000 |
commit | a3bb935b564e76f3fc6817fae36a023ff558b5d9 (patch) | |
tree | 4029d7d6aa576057d859a02d53d533abc61b2245 /sax/test | |
parent | 097c9e2609afe318a7ad8148d6692b5ec7ee340a (diff) |
cppcheck: prefer prefix variants
Diffstat (limited to 'sax/test')
-rw-r--r-- | sax/test/sax/testwriter.cxx | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/sax/test/sax/testwriter.cxx b/sax/test/sax/testwriter.cxx index 33ee9fa97073..f894236d190c 100644 --- a/sax/test/sax/testwriter.cxx +++ b/sax/test/sax/testwriter.cxx @@ -253,8 +253,10 @@ OUString AttributeListImpl::getTypeByName( const OUString& sName ) throw (Runti { vector<struct TagAttribute>::iterator ii = m_pImpl->vecAttribute.begin(); - for( ; ii != m_pImpl->vecAttribute.end() ; ii ++ ) { - if( (*ii).sName == sName ) { + for (; ii != m_pImpl->vecAttribute.end(); ++ii) + { + if( (*ii).sName == sName ) + { return (*ii).sType; } } @@ -265,8 +267,10 @@ OUString AttributeListImpl::getValueByName(const OUString& sName) throw (Runtim { vector<struct TagAttribute>::iterator ii = m_pImpl->vecAttribute.begin(); - for( ; ii != m_pImpl->vecAttribute.end() ; ii ++ ) { - if( (*ii).sName == sName ) { + for(; ii != m_pImpl->vecAttribute.end(); ++ii) + { + if( (*ii).sName == sName ) + { return (*ii).sValue; } } |