diff options
author | Julien Nabet <serval2412@yahoo.fr> | 2013-03-30 16:50:47 +0100 |
---|---|---|
committer | Julien Nabet <serval2412@yahoo.fr> | 2013-03-30 16:50:47 +0100 |
commit | bd5e62e199f30724b59f7261bd65add6375a1e16 (patch) | |
tree | 6c58e152996c7c87d63f8b6f90449d708469d0d4 /sdext | |
parent | 9cc04cb09590cd00395244f81bbf6c3292b99c2b (diff) |
Prefer prefix ++/-- operators for non-primitive types
+ convert while loop into for loop
To check:
could we use std::find (find_if)?
Is it always ok to do begin()+1?
What about if we return aEnd?
Change-Id: I59107de5693ad7b37e5eef80134c34a03982151e
Diffstat (limited to 'sdext')
-rw-r--r-- | sdext/source/minimizer/configurationaccess.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sdext/source/minimizer/configurationaccess.cxx b/sdext/source/minimizer/configurationaccess.cxx index c9ebbd6a8e36..2a3421758bc3 100644 --- a/sdext/source/minimizer/configurationaccess.cxx +++ b/sdext/source/minimizer/configurationaccess.cxx @@ -504,11 +504,11 @@ Sequence< PropertyValue > ConfigurationAccess::GetConfigurationSequence() std::vector< OptimizerSettings >::iterator ConfigurationAccess::GetOptimizerSettingsByName( const rtl::OUString& rName ) { std::vector< OptimizerSettings >::iterator aIter( maSettings.begin() + 1 ); - while ( aIter != maSettings.end() ) + const std::vector< OptimizerSettings >::const_iterator aEnd( maSettings.end() ); + for ( ; aIter != aEnd; ++aIter ) { if ( aIter->maName == rName ) break; - aIter++; } return aIter; } |