diff options
author | Noel Grandin <noel@peralex.com> | 2014-05-02 15:42:25 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2014-05-05 12:47:48 +0200 |
commit | 4f9b21248ffdf55cef9f3f9d1da76778ee000775 (patch) | |
tree | b059d288339a68aa4c3901f1100e99b04d05a23d /rsc | |
parent | b4107411900f5bb4c215e2d9db09fc2b2b82939b (diff) |
simplify ternary conditions "xxx ? yyy : false"
Look for code like:
xxx ? yyy : false;
Which can be simplified to:
xxx && yyy
Change-Id: Ia33c0e452aa28af3f0658a5382895aaad0246b4d
Diffstat (limited to 'rsc')
-rw-r--r-- | rsc/source/res/rscclass.cxx | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/rsc/source/res/rscclass.cxx b/rsc/source/res/rscclass.cxx index 0cb238a87f80..a25f5a56ed8e 100644 --- a/rsc/source/res/rscclass.cxx +++ b/rsc/source/res/rscclass.cxx @@ -721,8 +721,7 @@ ERRTYPE RscClass::WriteInstRc( const RSCINST & rInst, aError = aTmpI.pClass-> WriteRcHeader( aTmpI, rMem, pTC, RscId(), nDeep, - (nRsc_EXTRADATA == pVarTypeList[ i ].nVarName) - ? bExtra : false ); + (nRsc_EXTRADATA == pVarTypeList[ i ].nVarName) && bExtra ); } sal_uInt32 nMask = rMem.GetLong( nMaskOff ); nMask |= pVarTypeList[ i ].nMask; @@ -744,8 +743,7 @@ ERRTYPE RscClass::WriteInstRc( const RSCINST & rInst, aError = aTmpI.pClass-> WriteRcHeader( aTmpI, rMem, pTC, RscId(), nDeep, - (nRsc_EXTRADATA == pVarTypeList[ i ].nVarName) - ? bExtra : false ); + (nRsc_EXTRADATA == pVarTypeList[ i ].nVarName) && bExtra ); } } } |