summaryrefslogtreecommitdiff
path: root/dtrans
diff options
context:
space:
mode:
authorDavid Tardon <dtardon@redhat.com>2012-03-08 11:49:28 +0100
committerDavid Tardon <dtardon@redhat.com>2012-03-12 08:53:35 +0100
commit1be53d0081c2c40a95dae762d8a946d104b8e9cd (patch)
tree584bd753cf44883a2f8a5472396cbb191596366c /dtrans
parent55afdcce6d46e9824467999aef92ef04347cfeb1 (diff)
WaE: suggest explicit braces to avoid ambiguous 'else'
Diffstat (limited to 'dtrans')
-rw-r--r--dtrans/source/win32/misc/ImplHelper.cxx65
1 files changed, 33 insertions, 32 deletions
diff --git a/dtrans/source/win32/misc/ImplHelper.cxx b/dtrans/source/win32/misc/ImplHelper.cxx
index abeb028309a3..169d739f4280 100644
--- a/dtrans/source/win32/misc/ImplHelper.cxx
+++ b/dtrans/source/win32/misc/ImplHelper.cxx
@@ -385,39 +385,40 @@ sal_Int32 SAL_CALL CompareFormatEtc( const FORMATETC* pFetcLhs, const FORMATETC*
{
#endif
if ( pFetcLhs != pFetcRhs )
-
- if ( ( pFetcLhs->cfFormat != pFetcRhs->cfFormat ) ||
- ( pFetcLhs->lindex != pFetcRhs->lindex ) ||
- !CompareTargetDevice( pFetcLhs->ptd, pFetcRhs->ptd ) )
{
- nMatch = FORMATETC_NO_MATCH;
- }
-
- else if ( pFetcLhs->dwAspect == pFetcRhs->dwAspect )
- // same aspects; equal
- ;
- else if ( ( pFetcLhs->dwAspect & ~pFetcRhs->dwAspect ) != 0 )
- {
- // left not subset of aspects of right; not equal
- nMatch = FORMATETC_NO_MATCH;
- }
- else
- // left subset of right
- nMatch = FORMATETC_PARTIAL_MATCH;
-
- if ( nMatch == FORMATETC_EXACT_MATCH || nMatch == FORMATETC_PARTIAL_MATCH )
- {
- if ( pFetcLhs->tymed == pFetcRhs->tymed )
- // same medium flags; equal
- ;
- else if ( ( pFetcLhs->tymed & ~pFetcRhs->tymed ) != 0 )
- {
- // left not subset of medium flags of right; not equal
- nMatch = FORMATETC_NO_MATCH;
- }
- else
- // left subset of right
- nMatch = FORMATETC_PARTIAL_MATCH;
+ if ( ( pFetcLhs->cfFormat != pFetcRhs->cfFormat ) ||
+ ( pFetcLhs->lindex != pFetcRhs->lindex ) ||
+ !CompareTargetDevice( pFetcLhs->ptd, pFetcRhs->ptd ) )
+ {
+ nMatch = FORMATETC_NO_MATCH;
+ }
+
+ else if ( pFetcLhs->dwAspect == pFetcRhs->dwAspect )
+ // same aspects; equal
+ ;
+ else if ( ( pFetcLhs->dwAspect & ~pFetcRhs->dwAspect ) != 0 )
+ {
+ // left not subset of aspects of right; not equal
+ nMatch = FORMATETC_NO_MATCH;
+ }
+ else
+ // left subset of right
+ nMatch = FORMATETC_PARTIAL_MATCH;
+
+ if ( nMatch == FORMATETC_EXACT_MATCH || nMatch == FORMATETC_PARTIAL_MATCH )
+ {
+ if ( pFetcLhs->tymed == pFetcRhs->tymed )
+ // same medium flags; equal
+ ;
+ else if ( ( pFetcLhs->tymed & ~pFetcRhs->tymed ) != 0 )
+ {
+ // left not subset of medium flags of right; not equal
+ nMatch = FORMATETC_NO_MATCH;
+ }
+ else
+ // left subset of right
+ nMatch = FORMATETC_PARTIAL_MATCH;
+ }
}
}
#ifdef __MINGW32__