From a3bb935b564e76f3fc6817fae36a023ff558b5d9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= Date: Wed, 22 Dec 2010 13:43:24 +0000 Subject: [PATCH] cppcheck: prefer prefix variants --- sax/test/sax/testwriter.cxx | 12 ++++++++---- 1 file 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::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::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; } }