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
This commit is contained in:
@@ -504,11 +504,11 @@ Sequence< PropertyValue > ConfigurationAccess::GetConfigurationSequence()
|
|||||||
std::vector< OptimizerSettings >::iterator ConfigurationAccess::GetOptimizerSettingsByName( const rtl::OUString& rName )
|
std::vector< OptimizerSettings >::iterator ConfigurationAccess::GetOptimizerSettingsByName( const rtl::OUString& rName )
|
||||||
{
|
{
|
||||||
std::vector< OptimizerSettings >::iterator aIter( maSettings.begin() + 1 );
|
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 )
|
if ( aIter->maName == rName )
|
||||||
break;
|
break;
|
||||||
aIter++;
|
|
||||||
}
|
}
|
||||||
return aIter;
|
return aIter;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user