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 /i18npool/source/search | |
parent | import the document properties before the document (diff) | |
download | core-ba233e87efddf0a6751b35784dca1c805364ff3b.tar.gz core-ba233e87efddf0a6751b35784dca1c805364ff3b.zip |
remove unnecessary parenthesis in return statements
found with
$ git grep -lP 'return\s*\(\s*\w+\s*\)\s*;'
Change-Id: Ic51606877a9edcadeb647c5bf17bc928b69ab60e
Diffstat (limited to 'i18npool/source/search')
-rw-r--r-- | i18npool/source/search/levdis.cxx | 12 | ||||
-rw-r--r-- | i18npool/source/search/levdis.hxx | 22 |
2 files changed, 17 insertions, 17 deletions
diff --git a/i18npool/source/search/levdis.cxx b/i18npool/source/search/levdis.cxx index bc32b159bae7..c0dc37a0ee80 100644 --- a/i18npool/source/search/levdis.cxx +++ b/i18npool/source/search/levdis.cxx @@ -89,7 +89,7 @@ int WLevDistance::WLD( const sal_Unicode* cString, sal_Int32 nStringLen ) // more insertions or deletions necessary as the limit? Then leave if ( (nLenDiff * nInsQ0 > nLimit) || ((nStars == 0) && (nLenDiff * nDelR0 < -nLimit)) ) - return(LEVDISBIG); + return LEVDISBIG; // comparative String greater than instantaneous array // -> adapt array size @@ -247,7 +247,7 @@ int WLevDistance::WLD( const sal_Unicode* cString, sal_Int32 nStringLen ) } } if ( (nSPMin <= nLimit) && (npDistance[nStringLen] <= nLimit) ) - return(npDistance[nStringLen]); + return npDistance[nStringLen]; else { if ( bSplitCount ) @@ -257,10 +257,10 @@ int WLevDistance::WLD( const sal_Unicode* cString, sal_Int32 nStringLen ) if ( (nSPMin <= 2 * nLimit) && (npDistance[nStringLen] <= 2 * nLimit) && (nRepS * nRepP0 <= nLimit) ) - return( -npDistance[nStringLen] ); - return(LEVDISBIG); + return -npDistance[nStringLen]; + return LEVDISBIG; } - return(LEVDISBIG); + return LEVDISBIG; } } @@ -286,7 +286,7 @@ int WLevDistance::CalcLPQR( int nX, int nY, int nZ, bool bRelaxed ) nInsQ0 = ( nY ? nLimit / nY : nLimit + 1 ); nDelR0 = ( nZ ? nLimit / nZ : nLimit + 1 ); bSplitCount = bRelaxed; - return( nLimit ); + return nLimit; } // greatest common divisior according to Euklid (chaindivision) diff --git a/i18npool/source/search/levdis.hxx b/i18npool/source/search/levdis.hxx index e25883ba91c8..426e7228de5b 100644 --- a/i18npool/source/search/levdis.hxx +++ b/i18npool/source/search/levdis.hxx @@ -171,11 +171,11 @@ public: int CalcLPQR( int nOtherX, int nShorterY, int nLongerZ, bool bRelaxed = true ); - inline int GetLimit() const { return( nLimit ); } - inline int GetReplaceP0() const { return( nRepP0 ); } - inline int GetInsertQ0() const { return( nInsQ0 ); } - inline int GetDeleteR0() const { return( nDelR0 ); } - inline bool GetSplit() const { return( bSplitCount ); } + inline int GetLimit() const { return nLimit; } + inline int GetReplaceP0() const { return nRepP0; } + inline int GetInsertQ0() const { return nInsQ0; } + inline int GetDeleteR0() const { return nDelR0; } + inline bool GetSplit() const { return bSplitCount; } inline int SetLimit( int nNewLimit ); inline int SetReplaceP0( int nNewP0 ); inline int SetInsertQ0( int nNewQ0 ); @@ -184,7 +184,7 @@ public: internal weighs! */ inline bool SetSplit( bool bNewSplit ); - inline bool IsNormal( sal_Int32 nPos ) const { return( !bpPatIsWild[nPos] ); } + inline bool IsNormal( sal_Int32 nPos ) const { return !bpPatIsWild[nPos]; } // Calculate current balance, keep this inline for performance reasons! // c == cpPattern[jj] == cString[ii] @@ -224,35 +224,35 @@ inline int WLevDistance::SetLimit( int nNewLimit ) { int nTmp = nLimit; nLimit = nNewLimit; - return( nTmp ); + return nTmp; } inline int WLevDistance::SetReplaceP0( int nNewP0 ) { int nTmp = nRepP0; nRepP0 = nNewP0; - return( nTmp ); + return nTmp; } inline int WLevDistance::SetInsertQ0( int nNewQ0 ) { int nTmp = nInsQ0; nInsQ0 = nNewQ0; - return( nTmp ); + return nTmp; } inline int WLevDistance::SetDeleteR0( int nNewR0 ) { int nTmp = nDelR0; nDelR0 = nNewR0; - return( nTmp ); + return nTmp; } inline bool WLevDistance::SetSplit( bool bNewSplit ) { bool bTmp = bSplitCount; bSplitCount = bNewSplit; - return( bTmp ); + return bTmp; } #endif |