diff options
Diffstat (limited to 'svtools/source/control/ctrlbox.cxx')
-rw-r--r-- | svtools/source/control/ctrlbox.cxx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/svtools/source/control/ctrlbox.cxx b/svtools/source/control/ctrlbox.cxx index de28bb513ae5..2cceca8fd9a5 100644 --- a/svtools/source/control/ctrlbox.cxx +++ b/svtools/source/control/ctrlbox.cxx @@ -175,11 +175,11 @@ long BorderWidthImpl::GuessWidth( long nLine1, long nLine2, long nGap ) if ( (!bInvalid) && (!aToCompare.empty()) ) { nWidth = *aToCompare.begin(); - std::vector< double >::iterator pIt = aToCompare.begin(); - while ( pIt != aToCompare.end() && !bInvalid ) + for (auto const& elem : aToCompare) { - bInvalid = ( nWidth != *pIt ); - ++pIt; + bInvalid = ( nWidth != elem ); + if (bInvalid) + break; } nWidth = bInvalid ? 0.0 : nLine1 + nLine2 + nGap; } |