summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2015-02-11 13:20:49 +0200
committerNoel Grandin <noel@peralex.com>2015-02-23 09:26:58 +0200
commitba233e87efddf0a6751b35784dca1c805364ff3b (patch)
tree9d7c8a4256e688c2d47cb6ecf580ac196c4da2c0 /vcl
parenta2fa9e2468aa5c4fd4b610c5d0ebc8959e87a072 (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')
-rw-r--r--vcl/generic/fontmanager/parseAFM.cxx32
-rw-r--r--vcl/source/filter/sgfbram.cxx4
-rw-r--r--vcl/source/filter/sgvmain.cxx2
-rw-r--r--vcl/source/filter/sgvspln.cxx34
-rw-r--r--vcl/source/gdi/gdimtf.cxx6
-rw-r--r--vcl/source/gdi/impgraph.cxx2
-rw-r--r--vcl/source/gdi/pngwrite.cxx2
-rw-r--r--vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx22
-rw-r--r--vcl/unx/gtk3/gdi/gtk3salnativewidgets-gtk.cxx6
-rw-r--r--vcl/win/source/gdi/salnativewidgets-luna.cxx2
10 files changed, 56 insertions, 56 deletions
diff --git a/vcl/generic/fontmanager/parseAFM.cxx b/vcl/generic/fontmanager/parseAFM.cxx
index b73ea9b65e29..e3a3170a14ab 100644
--- a/vcl/generic/fontmanager/parseAFM.cxx
+++ b/vcl/generic/fontmanager/parseAFM.cxx
@@ -274,7 +274,7 @@ static char *token( FileInputStream* stream, int& rLen )
ident[idx] = 0;
rLen = idx;
- return(ident); /* returns pointer to the token */
+ return ident; /* returns pointer to the token */
} /* token */
@@ -302,7 +302,7 @@ static char *linetoken( FileInputStream* stream )
stream->ungetChar();
ident[idx] = 0;
- return(ident); /* returns pointer to the token */
+ return ident; /* returns pointer to the token */
} /* linetoken */
@@ -535,7 +535,7 @@ static int parseGlobals( FileInputStream* fp, GlobalFontInfo* gfi )
} /* switch */
} /* while */
- return(error);
+ return error;
} /* parseGlobals */
@@ -646,7 +646,7 @@ static int parseCharWidths( FileInputStream* fp, int* cwi)
} /* switch */
} /* while */
- return(error);
+ return error;
} /* parseCharWidths */
@@ -847,7 +847,7 @@ static int parseCharMetrics( FileInputStream* fp, FontInfo* fi)
if ((error == ok) && (count != fi->numOfChars))
error = parseError;
- return(error);
+ return error;
} /* parseCharMetrics */
@@ -953,7 +953,7 @@ static int parseTrackKernData( FileInputStream* fp, FontInfo* fi)
if (error == ok && tcount != fi->numOfTracks)
error = parseError;
- return(error);
+ return error;
} /* parseTrackKernData */
@@ -1078,7 +1078,7 @@ static int parsePairKernData( FileInputStream* fp, FontInfo* fi)
if (error == ok && pcount != fi->numOfPairs)
error = parseError;
- return(error);
+ return error;
} /* parsePairKernData */
@@ -1215,7 +1215,7 @@ static int parseCompCharData( FileInputStream* fp, FontInfo* fi)
if (error == ok && ccount != fi->numOfComps)
error = parseError;
- return(error);
+ return error;
} /* parseCompCharData */
@@ -1253,12 +1253,12 @@ int parseFile( const char* pFilename, FontInfo** fi, FLAGS flags)
char *keyword; /* used to store a token */
(*fi) = (FontInfo *) calloc(1, sizeof(FontInfo));
- if ((*fi) == NULL) {error = storageProblem; return(error);}
+ if ((*fi) == NULL) { error = storageProblem; return error; }
if (flags & P_G)
{
(*fi)->gfi = (GlobalFontInfo *) calloc(1, sizeof(GlobalFontInfo));
- if ((*fi)->gfi == NULL) {error = storageProblem; return(error);}
+ if ((*fi)->gfi == NULL) { error = storageProblem; return error; }
}
/* The AFM file begins with Global Font Information. This section */
@@ -1283,7 +1283,7 @@ int parseFile( const char* pFilename, FontInfo** fi, FLAGS flags)
{
(*fi)->cmi = (CharMetricInfo *)
calloc((*fi)->numOfChars, sizeof(CharMetricInfo));
- if ((*fi)->cmi == NULL) {error = storageProblem; return(error);}
+ if ((*fi)->cmi == NULL) { error = storageProblem; return error; }
code = parseCharMetrics(&aFile, *fi);
}
else
@@ -1294,7 +1294,7 @@ int parseFile( const char* pFilename, FontInfo** fi, FLAGS flags)
if ((*fi)->cwi == NULL)
{
error = storageProblem;
- return(error);
+ return error;
}
}
/* parse section regardless */
@@ -1336,7 +1336,7 @@ int parseFile( const char* pFilename, FontInfo** fi, FLAGS flags)
if ((*fi)->tkd == NULL)
{
error = storageProblem;
- return(error);
+ return error;
}
} /* if */
code = parseTrackKernData(&aFile, *fi);
@@ -1351,7 +1351,7 @@ int parseFile( const char* pFilename, FontInfo** fi, FLAGS flags)
if ((*fi)->pkd == NULL)
{
error = storageProblem;
- return(error);
+ return error;
}
} /* if */
code = parsePairKernData(&aFile, *fi);
@@ -1366,7 +1366,7 @@ int parseFile( const char* pFilename, FontInfo** fi, FLAGS flags)
if ((*fi)->ccd == NULL)
{
error = storageProblem;
- return(error);
+ return error;
}
} /* if */
code = parseCompCharData(&aFile, *fi);
@@ -1389,7 +1389,7 @@ int parseFile( const char* pFilename, FontInfo** fi, FLAGS flags)
if ((error != earlyEOF) && (code < 0)) error = code;
- return(error);
+ return error;
} /* parseFile */
diff --git a/vcl/source/filter/sgfbram.cxx b/vcl/source/filter/sgfbram.cxx
index 57faee330d13..8e9d167cd486 100644
--- a/vcl/source/filter/sgfbram.cxx
+++ b/vcl/source/filter/sgfbram.cxx
@@ -358,7 +358,7 @@ bool SgfBMapFilter(SvStream& rInp, SvStream& rOut)
} // while(nNext)
}
if (rInp.GetError()) bRet=false;
- return(bRet);
+ return bRet;
}
// for StarDraw embedded SGF vector
@@ -474,7 +474,7 @@ bool SgfVectFilter(SvStream& rInp, GDIMetaFile& rMtf)
}
} // while(nNext)
}
- return(bRet);
+ return bRet;
}
/*************************************************************************
diff --git a/vcl/source/filter/sgvmain.cxx b/vcl/source/filter/sgvmain.cxx
index 4e130e5213e2..63526dccecad 100644
--- a/vcl/source/filter/sgvmain.cxx
+++ b/vcl/source/filter/sgvmain.cxx
@@ -870,7 +870,7 @@ bool SgfSDrwFilter(SvStream& rInp, GDIMetaFile& rMtf, const INetURLObject& _aIni
} // while(nNext)
}
delete pSgfFonts;
- return(bRet);
+ return bRet;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
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;
}
diff --git a/vcl/source/gdi/gdimtf.cxx b/vcl/source/gdi/gdimtf.cxx
index 65b353760563..3193269f3f3a 100644
--- a/vcl/source/gdi/gdimtf.cxx
+++ b/vcl/source/gdi/gdimtf.cxx
@@ -1861,7 +1861,7 @@ BitmapEx GDIMetaFile::ImplBmpConvertFnc( const BitmapEx& rBmpEx, const void* pBm
Color GDIMetaFile::ImplColMonoFnc( const Color&, const void* pColParam )
{
- return( ( (const ImplColMonoParam*) pColParam )->aColor );
+ return ( (const ImplColMonoParam*) pColParam )->aColor;
}
BitmapEx GDIMetaFile::ImplBmpMonoFnc( const BitmapEx& rBmpEx, const void* pBmpParam )
@@ -1896,7 +1896,7 @@ Color GDIMetaFile::ImplColReplaceFnc( const Color& rColor, const void* pColParam
( ( (const ImplColReplaceParam*) pColParam )->pMinB[ i ] <= nB ) &&
( ( (const ImplColReplaceParam*) pColParam )->pMaxB[ i ] >= nB ) )
{
- return( ( (const ImplColReplaceParam*) pColParam )->pDstCols[ i ] );
+ return ( (const ImplColReplaceParam*) pColParam )->pDstCols[ i ];
}
}
@@ -2738,7 +2738,7 @@ sal_uLong GDIMetaFile::GetSizeBytes() const
}
}
- return( nSizeBytes );
+ return nSizeBytes;
}
SvStream& ReadGDIMetaFile( SvStream& rIStm, GDIMetaFile& rGDIMetaFile )
diff --git a/vcl/source/gdi/impgraph.cxx b/vcl/source/gdi/impgraph.cxx
index 457f50b3fa27..98bee4c9bbd1 100644
--- a/vcl/source/gdi/impgraph.cxx
+++ b/vcl/source/gdi/impgraph.cxx
@@ -822,7 +822,7 @@ sal_uLong ImpGraphic::ImplGetSizeBytes() const
}
}
- return( mnSizeBytes );
+ return mnSizeBytes;
}
void ImpGraphic::ImplDraw( OutputDevice* pOutDev, const Point& rDestPt ) const
diff --git a/vcl/source/gdi/pngwrite.cxx b/vcl/source/gdi/pngwrite.cxx
index 683f6fc887db..7f00f4e12e29 100644
--- a/vcl/source/gdi/pngwrite.cxx
+++ b/vcl/source/gdi/pngwrite.cxx
@@ -602,7 +602,7 @@ sal_uLong PNGWriterImpl::ImplGetFilter ( sal_uLong nY, sal_uLong nXStart, sal_uL
}
else
mnDeflateInSize = pDest - mpDeflateInBuf;
- return ( mnDeflateInSize );
+ return mnDeflateInSize;
}
void PNGWriterImpl::ImplClearFirstScanline()
diff --git a/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx b/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx
index 700308b385f3..27886a131b9c 100644
--- a/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx
+++ b/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx
@@ -958,7 +958,7 @@ bool GtkSalGraphics::drawNativeControl( ControlType nType,
if( xPixmap )
returnVal = NWRenderPixmapToScreen( xPixmap.get(), xMask.get(), aPixmapRect) && returnVal;
- return( returnVal );
+ return returnVal;
}
@@ -1333,7 +1333,7 @@ bool GtkSalGraphics::getNativeControlRegion( ControlType nType,
returnVal=true;
}
- return( returnVal );
+ return returnVal;
}
/************************************************************************
@@ -1778,7 +1778,7 @@ static Rectangle NWGetButtonArea( SalX11Screen nScreen,
aRect = Rectangle( Point( x, y ), Size( w, h ) );
- return( aRect );
+ return aRect;
}
static Rectangle NWGetTabItemRect( SalX11Screen nScreen, Rectangle aAreaRect )
@@ -2318,7 +2318,7 @@ static Rectangle NWGetScrollButtonRect( SalX11Screen nScreen, ControlPart nPa
buttonRect.SetSize( Size( buttonWidth, buttonHeight ) );
- return( buttonRect );
+ return buttonRect;
}
bool GtkSalGraphics::NWPaintGTKEditBox( GdkDrawable* gdkDrawable,
@@ -2379,7 +2379,7 @@ static Rectangle NWGetEditBoxPixmapRect(SalX11Screen nScreen,
pixmapRect.GetHeight() + (2*(focusWidth)) ) );
}
- return( pixmapRect );
+ return pixmapRect;
}
/* Paint a GTK Entry widget into the specified GdkPixmap.
@@ -2493,7 +2493,7 @@ bool GtkSalGraphics::NWPaintGTKSpinBox( ControlType nType, ControlPart nPart,
if ( !pSpinVal )
{
std::fprintf( stderr, "Tried to draw CTRL_SPINBUTTONS, but the SpinButtons data structure didn't exist!\n" );
- return( false );
+ return false;
}
pixmapRect = pSpinVal->maUpperRect;
pixmapRect.Union( pSpinVal->maLowerRect );
@@ -2594,7 +2594,7 @@ static Rectangle NWGetSpinButtonRect( SalX11Screen nScreen,
buttonRect.Bottom() = aAreaRect.Bottom();
}
- return( buttonRect );
+ return buttonRect;
}
static void NWPaintOneSpinButton( SalX11Screen nScreen,
@@ -2769,7 +2769,7 @@ static Rectangle NWGetComboBoxButtonRect( SalX11Screen nScreen,
aButtonRect.SetPos( aEditPos );
}
- return( aButtonRect );
+ return aButtonRect;
}
bool GtkSalGraphics::NWPaintGTKTabItem( ControlType nType, ControlPart,
@@ -2801,7 +2801,7 @@ bool GtkSalGraphics::NWPaintGTKTabItem( ControlType nType, ControlPart,
if ( (nType == CTRL_TAB_ITEM) && (aValue.getType() != CTRL_TAB_ITEM) )
{
- return( false );
+ return false;
}
NWEnsureGTKButton( m_nXScreen );
@@ -3726,7 +3726,7 @@ static Rectangle NWGetListBoxButtonRect( SalX11Screen nScreen,
if ( pIndicatorSpacing )
gtk_border_free( pIndicatorSpacing );
- return( aPartRect );
+ return aPartRect;
}
static Rectangle NWGetListBoxIndicatorRect( SalX11Screen nScreen,
@@ -3776,7 +3776,7 @@ static Rectangle NWGetListBoxIndicatorRect( SalX11Screen nScreen,
if ( pIndicatorSpacing )
gtk_border_free( pIndicatorSpacing );
- return( aIndicatorRect );
+ return aIndicatorRect;
}
static Rectangle NWGetToolbarRect( SalX11Screen nScreen,
diff --git a/vcl/unx/gtk3/gdi/gtk3salnativewidgets-gtk.cxx b/vcl/unx/gtk3/gdi/gtk3salnativewidgets-gtk.cxx
index db08c0284951..ac708fc5e1b7 100644
--- a/vcl/unx/gtk3/gdi/gtk3salnativewidgets-gtk.cxx
+++ b/vcl/unx/gtk3/gdi/gtk3salnativewidgets-gtk.cxx
@@ -157,7 +157,7 @@ Rectangle GtkSalGraphics::NWGetSpinButtonRect( ControlPart nPart, Rectangle aAre
gtk_style_context_restore(mpSpinStyle);
- return( buttonRect );
+ return buttonRect;
}
Rectangle GtkSalGraphics::NWGetScrollButtonRect( ControlPart nPart, Rectangle aAreaRect )
@@ -242,7 +242,7 @@ Rectangle GtkSalGraphics::NWGetScrollButtonRect( ControlPart nPart, Rectangle aA
buttonRect.SetSize( Size( buttonWidth, buttonHeight ) );
- return( buttonRect );
+ return buttonRect;
}
void GtkSalGraphics::PaintScrollbar(GtkStyleContext *context,
@@ -688,7 +688,7 @@ Rectangle GtkSalGraphics::NWGetComboBoxButtonRect( ControlType nType,
aButtonRect.SetPos( aEditPos );
}
- return( aButtonRect );
+ return aButtonRect;
}
void GtkSalGraphics::PaintCombobox( GtkStyleContext *context,
diff --git a/vcl/win/source/gdi/salnativewidgets-luna.cxx b/vcl/win/source/gdi/salnativewidgets-luna.cxx
index 670137992aa8..9b690db4311a 100644
--- a/vcl/win/source/gdi/salnativewidgets-luna.cxx
+++ b/vcl/win/source/gdi/salnativewidgets-luna.cxx
@@ -1520,7 +1520,7 @@ bool WinSalGraphics::getNativeControlRegion( ControlType nType,
}
ReleaseDC( mhWnd, hDC );
- return( bRet );
+ return bRet;
}
void WinSalGraphics::updateSettingsNative( AllSettings& rSettings )