diff options
author | Caolán McNamara <caolanm@redhat.com> | 2010-12-23 12:49:15 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2010-12-23 12:59:27 +0000 |
commit | 3e3d74baf1361c3c4b0fafd0effa27832a1b2c6a (patch) | |
tree | ed47e6e32078295a44c68d280351ed744bcd15a2 /sax/source | |
parent | 75c32a4ba738a6cdf65356d8f4267b50ba894a9b (diff) |
cppcheck: prefer prefix variant
Diffstat (limited to 'sax/source')
-rw-r--r-- | sax/source/expatwrap/attrlistimpl.cxx | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/sax/source/expatwrap/attrlistimpl.cxx b/sax/source/expatwrap/attrlistimpl.cxx index a355658fee28..f7ec5d16f664 100644 --- a/sax/source/expatwrap/attrlistimpl.cxx +++ b/sax/source/expatwrap/attrlistimpl.cxx @@ -112,8 +112,10 @@ OUString AttributeList::getTypeByName( const OUString& sName ) throw (RuntimeExc { 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; } } @@ -124,8 +126,10 @@ OUString AttributeList::getValueByName(const OUString& sName) throw (RuntimeExce { 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; } } |