diff options
author | Noel Grandin <noel@peralex.com> | 2015-02-11 13:20:49 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2015-02-23 09:26:58 +0200 |
commit | ba233e87efddf0a6751b35784dca1c805364ff3b (patch) | |
tree | 9d7c8a4256e688c2d47cb6ecf580ac196c4da2c0 /rsc/inc | |
parent | a2fa9e2468aa5c4fd4b610c5d0ebc8959e87a072 (diff) |
remove unnecessary parenthesis in return statements
found with
$ git grep -lP 'return\s*\(\s*\w+\s*\)\s*;'
Change-Id: Ic51606877a9edcadeb647c5bf17bc928b69ab60e
Diffstat (limited to 'rsc/inc')
-rw-r--r-- | rsc/inc/rscclobj.hxx | 14 | ||||
-rw-r--r-- | rsc/inc/rscerror.h | 2 | ||||
-rw-r--r-- | rsc/inc/rscflag.hxx | 11 | ||||
-rw-r--r-- | rsc/inc/rscpar.hxx | 12 | ||||
-rw-r--r-- | rsc/inc/rsctools.hxx | 12 |
5 files changed, 24 insertions, 27 deletions
diff --git a/rsc/inc/rscclobj.hxx b/rsc/inc/rscclobj.hxx index a66959b3425f..674b6b196486 100644 --- a/rsc/inc/rscclobj.hxx +++ b/rsc/inc/rscclobj.hxx @@ -38,21 +38,21 @@ public: ObjNode( const RscId & rId, CLASS_DATA pData, sal_uLong lKey ); ObjNode * DelObjNode( RscTop * pClass, sal_uLong lFileKey ); sal_uInt32 GetId() const SAL_OVERRIDE; - RscId GetRscId(){ return( aRscId ); } + RscId GetRscId(){ return aRscId; } sal_uLong GetFileKey(){ return lFileKey; }; ObjNode* Search( const RscId &rName ) const //< search the index in the b-tree { - return( static_cast<ObjNode *>(IdNode::Search( rName )) ); + return static_cast<ObjNode *>(IdNode::Search( rName )); } bool Insert( ObjNode* pTN ) //< insert a new node in the b-tree { - return( IdNode::Insert( (IdNode *)pTN ) ); + return IdNode::Insert( (IdNode *)pTN ); } CLASS_DATA GetRscObj() //< get the Object from this Node { - return( pRscObj ); + return pRscObj; } bool IsConsistent(); }; @@ -72,11 +72,11 @@ public: sal_uInt32 GetId() const SAL_OVERRIDE; RefNode* Search( Atom typ ) const //< search the index in the b-tree { - return( static_cast<RefNode *>(IdNode::Search( typ )) ); + return static_cast<RefNode *>(IdNode::Search( typ )); } bool Insert( RefNode* pTN ) //< insert a new node in the b-tree { - return( IdNode::Insert( (IdNode *)pTN ) ); + return IdNode::Insert( (IdNode *)pTN ); } bool PutObjNode( ObjNode * pPutObject ); @@ -86,7 +86,7 @@ public: ObjNode * GetObjNode() { // hole pObjBiTree - return( pObjBiTree ); + return pObjBiTree; } }; diff --git a/rsc/inc/rscerror.h b/rsc/inc/rscerror.h index 7954cf4cdf46..754e71e60b01 100644 --- a/rsc/inc/rscerror.h +++ b/rsc/inc/rscerror.h @@ -93,7 +93,7 @@ public: ERRTYPE( sal_uInt32 nErr ) { nError = nErr; } ERRTYPE( const ERRTYPE & rErr ) { nError = rErr.nError; } ERRTYPE& operator = ( const ERRTYPE & rError ); - operator sal_uInt32() const { return( nError ); } + operator sal_uInt32() const { return nError; } bool IsError() const { return nError <= ERR_ERROREND; } bool IsOk() const { return !IsError(); } bool IsWarning() const { return nError >= ERR_WARNINGSTART && nError <= ERR_WARNINGEND;} diff --git a/rsc/inc/rscflag.hxx b/rsc/inc/rscflag.hxx index 875ebadabf92..cb10c496d705 100644 --- a/rsc/inc/rscflag.hxx +++ b/rsc/inc/rscflag.hxx @@ -71,11 +71,11 @@ public: Atom nConstantId ); virtual RSCCLASS_TYPE GetClassType() const SAL_OVERRIDE; RSCINST Create( RSCINST * pInst, const RSCINST & rDflt, bool ) SAL_OVERRIDE; - sal_uInt32 Size() SAL_OVERRIDE { return( pRefClass->Size() ); }; + sal_uInt32 Size() SAL_OVERRIDE { return pRefClass->Size(); } // Eine Zuweisung an eine Variable bool IsDefault( const RSCINST & rInst ) SAL_OVERRIDE { - return( pRefClass->IsDefault( rInst, nConstId ) ); + return pRefClass->IsDefault( rInst, nConstId ); }; // Als Default setzen bool IsValueDefault( const RSCINST & rInst, CLASS_DATA pDef ) SAL_OVERRIDE @@ -86,15 +86,14 @@ public: ERRTYPE SetBool( const RSCINST & rInst, bool bValue ) SAL_OVERRIDE { if( bValue ) - return( pRefClass->SetConst( rInst, nConstId, sal_Int32(bValue) ) ); + return pRefClass->SetConst( rInst, nConstId, sal_Int32(bValue) ); else - return( pRefClass-> - SetNotConst( rInst, nConstId ) ); + return pRefClass->SetNotConst( rInst, nConstId ); } ERRTYPE GetBool( const RSCINST & rInst, bool * pB ) SAL_OVERRIDE { *pB = pRefClass->IsSet( rInst, nConstId ); - return( ERR_OK ); + return ERR_OK; } void WriteSrc( const RSCINST & rInst, FILE * fOutput, RscTypCont * pTC, sal_uInt32 nTab, const char * ) SAL_OVERRIDE; diff --git a/rsc/inc/rscpar.hxx b/rsc/inc/rscpar.hxx index 0b9bc4cb0afc..90c9eee5589a 100644 --- a/rsc/inc/rscpar.hxx +++ b/rsc/inc/rscpar.hxx @@ -54,12 +54,12 @@ public: ~RscFileInst(); bool IsEof() const { return bEof; } void SetFileIndex( sal_uLong lFIndex ) { lFileIndex = lFIndex; } - sal_uLong GetFileIndex() { return( lFileIndex ); } - sal_uLong GetSrcIndex() { return( lSrcIndex ); } - void SetLineNo( sal_uInt32 nLine ) { nLineNo = nLine; } - sal_uInt32 GetLineNo() { return( nLineNo ); } - sal_uInt32 GetScanPos() { return( nScanPos ); } - char * GetLine() { return( pLine ); } + sal_uLong GetFileIndex() { return lFileIndex; } + sal_uLong GetSrcIndex() { return lSrcIndex; } + void SetLineNo( sal_uInt32 nLine ) { nLineNo = nLine; } + sal_uInt32 GetLineNo() { return nLineNo; } + sal_uInt32 GetScanPos() { return nScanPos; } + char * GetLine() { return pLine; } int GetChar(); int GetFastChar() { diff --git a/rsc/inc/rsctools.hxx b/rsc/inc/rsctools.hxx index e7cde4a8aa84..f8d50c02e077 100644 --- a/rsc/inc/rsctools.hxx +++ b/rsc/inc/rsctools.hxx @@ -73,13 +73,11 @@ public: RscPtrPtr(); ~RscPtrPtr(); void Reset(); - sal_uInt32 Append( void * ); - sal_uInt32 Append( char * pStr ){ - return( Append( (void *)pStr ) ); - }; - sal_uInt32 GetCount(){ return( nCount ); }; + sal_uInt32 Append( void * ); + sal_uInt32 Append( char * pStr ) { return Append( (void *)pStr ); } + sal_uInt32 GetCount() { return nCount; } void * GetEntry( sal_uInt32 nEle ); - void ** GetBlock(){ return( pMem ); }; + void ** GetBlock() { return pMem; } }; class RscWriteRc @@ -124,7 +122,7 @@ public: RSCBYTEORDER_TYPE GetByteOrder() const { return nByteOrder; } - sal_uInt32 Size(){ return( nLen ); }; + sal_uInt32 Size(){ return nLen; } void Put( sal_uInt64 lVal ) { union |