diff options
author | Mike Kaganski <mike.kaganski@collabora.com> | 2018-10-29 10:53:11 +0100 |
---|---|---|
committer | Mike Kaganski <mike.kaganski@collabora.com> | 2018-10-29 12:07:52 +0100 |
commit | 53c907aa2411f92059d15a961874b22a543745ed (patch) | |
tree | 7e218203db337e8ffa7d62d057bedd35abd9ed61 /sw | |
parent | 19a0698079fbba36646a2d06eaec3a7fde60b2f5 (diff) |
Simplify conditions a bit
bOn is implied when nCount is > 0
Change-Id: I77939668445603a22ae9ea56a7d272ca650c5c1c
Reviewed-on: https://gerrit.libreoffice.org/62499
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/core/text/txtfly.cxx | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/sw/source/core/text/txtfly.cxx b/sw/source/core/text/txtfly.cxx index 535c570e0e90..31f04c376233 100644 --- a/sw/source/core/text/txtfly.cxx +++ b/sw/source/core/text/txtfly.cxx @@ -490,8 +490,8 @@ void SwTextFly::DrawTextOpaque( SwDrawTextInfo &rInf ) OSL_ENSURE( !bTopRule, "DrawTextOpaque: Wrong TopRule" ); // #i68520# - SwAnchoredObjList::size_type nCount( bOn ? GetAnchoredObjList()->size() : 0 ); - if ( bOn && nCount > 0 ) + const SwAnchoredObjList::size_type nCount( bOn ? GetAnchoredObjList()->size() : 0 ); + if (nCount > 0) { const SdrLayerID nHellId = pPage->getRootFrame()->GetCurrShell()->getIDocumentDrawModelAccess().GetHellId(); for( SwAnchoredObjList::size_type i = 0; i < nCount; ++i ) @@ -576,8 +576,8 @@ void SwTextFly::DrawFlyRect( OutputDevice* pOut, const SwRect &rRect ) SwRegionRects aRegion( rRect ); OSL_ENSURE( !bTopRule, "DrawFlyRect: Wrong TopRule" ); // #i68520# - SwAnchoredObjList::size_type nCount( bOn ? GetAnchoredObjList()->size() : 0 ); - if ( bOn && nCount > 0 ) + const SwAnchoredObjList::size_type nCount( bOn ? GetAnchoredObjList()->size() : 0 ); + if (nCount > 0) { const SdrLayerID nHellId = pPage->getRootFrame()->GetCurrShell()->getIDocumentDrawModelAccess().GetHellId(); for( SwAnchoredObjList::size_type i = 0; i < nCount; ++i ) @@ -1001,8 +1001,8 @@ bool SwTextFly::ForEach( const SwRect &rRect, SwRect* pRect, bool bAvoid ) const bool bRet = false; // #i68520# - SwAnchoredObjList::size_type nCount( bOn ? GetAnchoredObjList()->size() : 0 ); - if ( bOn && nCount > 0 ) + const SwAnchoredObjList::size_type nCount( bOn ? GetAnchoredObjList()->size() : 0 ); + if (nCount > 0) { for( SwAnchoredObjList::size_type i = 0; i < nCount; ++i ) { |