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 /vcl/source/filter/sgvspln.cxx | |
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 'vcl/source/filter/sgvspln.cxx')
-rw-r--r-- | vcl/source/filter/sgvspln.cxx | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/vcl/source/filter/sgvspln.cxx b/vcl/source/filter/sgvspln.cxx index 0d892b998493..8c9c09be4d2e 100644 --- a/vcl/source/filter/sgvspln.cxx +++ b/vcl/source/filter/sgvspln.cxx @@ -75,7 +75,7 @@ double masch() /* calculate MACH_EPS machine independence */ x = 1.0 + eps; } eps *= 2.0; - return (eps); + return eps; } short basis() /* calculate BASE machine independence */ @@ -85,7 +85,7 @@ short basis() /* calculate BASE machine independence */ while ( (x + one) - x == one ) x *= 2.0; while ( (x + b) == x ) b *= 2.0; - return ( (short) ((x + b) - x) ); + return (short) ((x + b) - x); } #define BASIS basis() /* base of number representation */ @@ -205,7 +205,7 @@ sal_uInt16 TriDiagGS(bool rep, sal_uInt16 n, double* lower, // double fabs(double); - if ( n < 2 ) return(1); /* n at least 2 */ + if ( n < 2 ) return 1; /* n at least 2 */ /* if rep = false, */ /* determine the */ @@ -215,13 +215,13 @@ sal_uInt16 TriDiagGS(bool rep, sal_uInt16 n, double* lower, { for (i = 1; i < n; i++) { if ( fabs(diag[i-1]) < MACH_EPS ) /* do not decompose */ - return(2); /* if one diag[i] = 0 */ + return 2; /* if one diag[i] = 0 */ lower[i] /= diag[i-1]; diag[i] -= lower[i] * upper[i-1]; } } - if ( fabs(diag[n-1]) < MACH_EPS ) return(2); + if ( fabs(diag[n-1]) < MACH_EPS ) return 2; for (i = 1; i < n; i++) /* forward elimination */ b[i] -= lower[i] * b[i-1]; @@ -231,7 +231,7 @@ sal_uInt16 TriDiagGS(bool rep, sal_uInt16 n, double* lower, i=j; b[i] = ( b[i] - upper[i] * b[i+1] ) / diag[i]; } - return(0); + return 0; } /*----------------------- END OF TRIDIAGONAL ------------------------*/ @@ -328,13 +328,13 @@ sal_uInt16 ZyklTriDiagGS(bool rep, sal_uInt16 n, double* lower, double* diag, sal_uInt16 i; short j; - if ( n < 3 ) return(1); + if ( n < 3 ) return 1; if (!rep) /* If rep = false, */ { /* calculate decomposition */ lower[0] = upper[n-1] = 0.0; /* of the matrix. */ - if ( fabs (diag[0]) < MACH_EPS ) return(2); + if ( fabs (diag[0]) < MACH_EPS ) return 2; /* Do not decompose if the */ temp = 1.0 / diag[0]; /* value of a diagonal */ upper[0] *= temp; /* element is smaller then */ @@ -342,14 +342,14 @@ sal_uInt16 ZyklTriDiagGS(bool rep, sal_uInt16 n, double* lower, double* diag, for (i = 1; i < n-2; i++) { diag[i] -= lower[i] * upper[i-1]; - if ( fabs(diag[i]) < MACH_EPS ) return(2); + if ( fabs(diag[i]) < MACH_EPS ) return 2; temp = 1.0 / diag[i]; upper[i] *= temp; ricol[i] = -lower[i] * ricol[i-1] * temp; } diag[n-2] -= lower[n-2] * upper[n-3]; - if ( fabs(diag[n-2]) < MACH_EPS ) return(2); + if ( fabs(diag[n-2]) < MACH_EPS ) return 2; for (i = 1; i < n-2; i++) lowrow[i] = -lowrow[i-1] * upper[i-1]; @@ -361,7 +361,7 @@ sal_uInt16 ZyklTriDiagGS(bool rep, sal_uInt16 n, double* lower, double* diag, temp -= lowrow[i] * ricol[i]; diag[n-1] += temp - lower[n-1] * upper[n-2]; - if ( fabs(diag[n-1]) < MACH_EPS ) return(2); + if ( fabs(diag[n-1]) < MACH_EPS ) return 2; } b[0] /= diag[0]; /* forward elimination */ @@ -378,7 +378,7 @@ sal_uInt16 ZyklTriDiagGS(bool rep, sal_uInt16 n, double* lower, double* diag, i=j; b[i] -= upper[i] * b[i+1] + ricol[i] * b[n-1]; } - return(0); + return 0; } /*------------------ END of CYCLIC TRIDIAGONAL ---------------------*/ @@ -525,7 +525,7 @@ sal_uInt16 PeriodicSpline(sal_uInt16 n, double* x, double* y, Error=ZyklTriDiagGS(false,n,b,d,c,lowrow.get(),ricol.get(),a.get()); if ( Error != 0 ) { - return(Error+4); + return Error+4; } for (i=0;i<=nm1;i++) c[i+1]=a[i]; } @@ -594,14 +594,14 @@ sal_uInt16 ParaSpline(sal_uInt16 n, double* x, double* y, sal_uInt8 MargCond, } // switch MargCond if (MargCond==3) { Error=PeriodicSpline(n,T,x,bx,cx,dx); - if (Error!=0) return(Error+4); + if (Error!=0) return Error+4; Error=PeriodicSpline(n,T,y,by,cy,dy); - if (Error!=0) return(Error+10); + if (Error!=0) return Error+10; } else { Error=NaturalSpline(n,T,x,alphX,betX,MargCond,bx,cx,dx); - if (Error!=0) return(Error+4); + if (Error!=0) return Error+4; Error=NaturalSpline(n,T,y,alphY,betY,MargCond,by,cy,dy); - if (Error!=0) return(Error+9); + if (Error!=0) return Error+9; } return 0; } |