diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-06-08 12:03:12 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-06-09 15:05:54 +0200 |
commit | 1dd5e226bd57254024640b10cbbe639f12564655 (patch) | |
tree | 6fbbe3197fbb7f74eaa5786919ced46a06cbf39d /vcl/source | |
parent | 027b25ecd54ac97ea2471ca73e3ba89ce052fe76 (diff) |
clang-tidy readability-non-const-parameter
Change-Id: I7b2680898dbfc49185fb949349d81f4ac615a470
Reviewed-on: https://gerrit.libreoffice.org/38593
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'vcl/source')
-rw-r--r-- | vcl/source/filter/igif/gifread.cxx | 4 | ||||
-rw-r--r-- | vcl/source/filter/sgvspln.cxx | 6 | ||||
-rw-r--r-- | vcl/source/filter/sgvtext.cxx | 2 | ||||
-rw-r--r-- | vcl/source/fontsubset/fontsubset.cxx | 2 | ||||
-rw-r--r-- | vcl/source/fontsubset/sft.cxx | 2 | ||||
-rw-r--r-- | vcl/source/gdi/alpha.cxx | 2 | ||||
-rw-r--r-- | vcl/source/gdi/bitmap3.cxx | 2 | ||||
-rw-r--r-- | vcl/source/gdi/bitmap4.cxx | 2 | ||||
-rw-r--r-- | vcl/source/gdi/bmpacc2.cxx | 8 | ||||
-rw-r--r-- | vcl/source/gdi/pdfwriter_impl.cxx | 10 | ||||
-rw-r--r-- | vcl/source/gdi/pdfwriter_impl.hxx | 3 | ||||
-rw-r--r-- | vcl/source/gdi/salmisc.cxx | 8 |
12 files changed, 26 insertions, 25 deletions
diff --git a/vcl/source/filter/igif/gifread.cxx b/vcl/source/filter/igif/gifread.cxx index b9611ca66992..3b2a74302d32 100644 --- a/vcl/source/filter/igif/gifread.cxx +++ b/vcl/source/filter/igif/gifread.cxx @@ -96,7 +96,7 @@ class GIFReader : public GraphicReader bool ReadExtension(); bool ReadLocalHeader(); sal_uLong ReadNextBlock(); - void FillImages( sal_uInt8* pBytes, sal_uLong nCount ); + void FillImages( const sal_uInt8* pBytes, sal_uLong nCount ); void CreateNewBitmaps(); bool ProcessGIF(); @@ -517,7 +517,7 @@ sal_uLong GIFReader::ReadNextBlock() return nRet; } -void GIFReader::FillImages( sal_uInt8* pBytes, sal_uLong nCount ) +void GIFReader::FillImages( const sal_uInt8* pBytes, sal_uLong nCount ) { for( sal_uLong i = 0UL; i < nCount; i++ ) { diff --git a/vcl/source/filter/sgvspln.cxx b/vcl/source/filter/sgvspln.cxx index 0e8740a2f4f7..021d70399c6e 100644 --- a/vcl/source/filter/sgvspln.cxx +++ b/vcl/source/filter/sgvspln.cxx @@ -125,7 +125,7 @@ short basis() /* calculate BASE machine independence */ /*---------------------- MODULE tridiagonal -----------------------*/ sal_uInt16 TriDiagGS(sal_uInt16 n, double* lower, - double* diag, double* upper, double* b) + double* diag, const double* upper, double* b) /*************************/ /* Gaussian methods for */ /* tridiagonal matrices */ @@ -389,7 +389,7 @@ sal_uInt16 ZyklTriDiagGS(sal_uInt16 n, double* lower, double* diag, } // extern "C" // Calculates the coefficients of natural cubic splines with n intervals. -sal_uInt16 NaturalSpline(sal_uInt16 n, double* x, double* y, +sal_uInt16 NaturalSpline(sal_uInt16 n, const double* x, const double* y, double Marg0, double MargN, sal_uInt8 MargCond, double* b, double* c, double* d) @@ -490,7 +490,7 @@ sal_uInt16 NaturalSpline(sal_uInt16 n, double* x, double* y, } // calculates the coefficients of periodical cubic splines with n intervals. -sal_uInt16 PeriodicSpline(sal_uInt16 n, double* x, double* y, +sal_uInt16 PeriodicSpline(sal_uInt16 n, const double* x, double* y, double* b, double* c, double* d) { // array dimensions should range from [0..n]! sal_uInt16 Error; diff --git a/vcl/source/filter/sgvtext.cxx b/vcl/source/filter/sgvtext.cxx index d5ce9c988b3b..dfc2e0a7a8a9 100644 --- a/vcl/source/filter/sgvtext.cxx +++ b/vcl/source/filter/sgvtext.cxx @@ -261,7 +261,7 @@ UCHAR GetNextChar(UCHAR* TBuf, sal_uInt16 Index) return TBuf[Index]; } -UCHAR ProcessOne(UCHAR* TBuf, sal_uInt16& Index, +UCHAR ProcessOne(const UCHAR* TBuf, sal_uInt16& Index, ObjTextType& Atr0, ObjTextType& AktAtr, bool ScanEsc) { diff --git a/vcl/source/fontsubset/fontsubset.cxx b/vcl/source/fontsubset/fontsubset.cxx index be3de69e01e7..51369ffce76f 100644 --- a/vcl/source/fontsubset/fontsubset.cxx +++ b/vcl/source/fontsubset/fontsubset.cxx @@ -156,7 +156,7 @@ bool FontSubsetInfo::CreateFontSubsetFromSfnt( sal_Int32* pOutGlyphWidths ) } // TODO: replace dummy implementation -bool FontSubsetInfo::CreateFontSubsetFromType1( sal_Int32* pOutGlyphWidths) +bool FontSubsetInfo::CreateFontSubsetFromType1( const sal_Int32* pOutGlyphWidths) { (void)pOutGlyphWidths; fprintf(stderr,"CreateFontSubsetFromType1: replace dummy implementation\n"); diff --git a/vcl/source/fontsubset/sft.cxx b/vcl/source/fontsubset/sft.cxx index c1570b56855e..db0caf4f6649 100644 --- a/vcl/source/fontsubset/sft.cxx +++ b/vcl/source/fontsubset/sft.cxx @@ -2344,7 +2344,7 @@ bool GetSfntTable( TrueTypeFont* ttf, int nSubtableIndex, return bOk; } -TTSimpleGlyphMetrics *GetTTSimpleGlyphMetrics(TrueTypeFont *ttf, sal_uInt16 *glyphArray, int nGlyphs, bool vertical) +TTSimpleGlyphMetrics *GetTTSimpleGlyphMetrics(TrueTypeFont *ttf, const sal_uInt16 *glyphArray, int nGlyphs, bool vertical) { const sal_uInt8* pTable; sal_uInt32 n; diff --git a/vcl/source/gdi/alpha.cxx b/vcl/source/gdi/alpha.cxx index 5ee1adbff428..6d628405373b 100644 --- a/vcl/source/gdi/alpha.cxx +++ b/vcl/source/gdi/alpha.cxx @@ -42,7 +42,7 @@ AlphaMask::AlphaMask( AlphaMask&& rAlphaMask ) : { } -AlphaMask::AlphaMask( const Size& rSizePixel, sal_uInt8* pEraseTransparency ) : +AlphaMask::AlphaMask( const Size& rSizePixel, const sal_uInt8* pEraseTransparency ) : Bitmap( rSizePixel, 8, &Bitmap::GetGreyPalette( 256 ) ) { if( pEraseTransparency ) diff --git a/vcl/source/gdi/bitmap3.cxx b/vcl/source/gdi/bitmap3.cxx index 38c3dbcc68dc..31796149ad9e 100644 --- a/vcl/source/gdi/bitmap3.cxx +++ b/vcl/source/gdi/bitmap3.cxx @@ -2123,7 +2123,7 @@ bool Bitmap::Adjust( short nLuminancePercent, short nContrastPercent, return bRet; } -bool Bitmap::ImplConvolutionPass(Bitmap& aNewBitmap, BitmapReadAccess* pReadAcc, int aNumberOfContributions, double* pWeights, int* pPixels, int* pCount) +bool Bitmap::ImplConvolutionPass(Bitmap& aNewBitmap, BitmapReadAccess* pReadAcc, int aNumberOfContributions, const double* pWeights, int* pPixels, const int* pCount) { if (!pReadAcc) return false; diff --git a/vcl/source/gdi/bitmap4.cxx b/vcl/source/gdi/bitmap4.cxx index 789ebc80296e..d5e995770993 100644 --- a/vcl/source/gdi/bitmap4.cxx +++ b/vcl/source/gdi/bitmap4.cxx @@ -1064,7 +1064,7 @@ double* MakeBlurKernel(const double radius, int& rows) { } void Bitmap::ImplBlurContributions( const int aSize, const int aNumberOfContributions, - double* pBlurVector, double*& pWeights, int*& pPixels, int*& pCount ) + const double* pBlurVector, double*& pWeights, int*& pPixels, int*& pCount ) { pWeights = new double[ aSize*aNumberOfContributions ]; pPixels = new int[ aSize*aNumberOfContributions ]; diff --git a/vcl/source/gdi/bmpacc2.cxx b/vcl/source/gdi/bmpacc2.cxx index ab67ddda9d3e..984cdb138e87 100644 --- a/vcl/source/gdi/bmpacc2.cxx +++ b/vcl/source/gdi/bmpacc2.cxx @@ -25,7 +25,7 @@ BitmapColor BitmapReadAccess::GetPixelForN1BitMsbPal(ConstScanline pScanline, lo return BitmapColor( pScanline[ nX >> 3 ] & ( 1 << ( 7 - ( nX & 7 ) ) ) ? 1 : 0 ); } -void BitmapReadAccess::SetPixelForN1BitMsbPal(Scanline pScanline, long nX, const BitmapColor& rBitmapColor, const ColorMask&) +void BitmapReadAccess::SetPixelForN1BitMsbPal(const Scanline pScanline, long nX, const BitmapColor& rBitmapColor, const ColorMask&) { sal_uInt8& rByte = pScanline[ nX >> 3 ]; @@ -38,7 +38,7 @@ BitmapColor BitmapReadAccess::GetPixelForN1BitLsbPal(ConstScanline pScanline, lo return BitmapColor( pScanline[ nX >> 3 ] & ( 1 << ( nX & 7 ) ) ? 1 : 0 ); } -void BitmapReadAccess::SetPixelForN1BitLsbPal(Scanline pScanline, long nX, const BitmapColor& rBitmapColor, const ColorMask&) +void BitmapReadAccess::SetPixelForN1BitLsbPal(const Scanline pScanline, long nX, const BitmapColor& rBitmapColor, const ColorMask&) { sal_uInt8& rByte = pScanline[ nX >> 3 ]; @@ -51,7 +51,7 @@ BitmapColor BitmapReadAccess::GetPixelForN4BitMsnPal(ConstScanline pScanline, lo return BitmapColor( ( pScanline[ nX >> 1 ] >> ( nX & 1 ? 0 : 4 ) ) & 0x0f ); } -void BitmapReadAccess::SetPixelForN4BitMsnPal(Scanline pScanline, long nX, const BitmapColor& rBitmapColor, const ColorMask&) +void BitmapReadAccess::SetPixelForN4BitMsnPal(const Scanline pScanline, long nX, const BitmapColor& rBitmapColor, const ColorMask&) { sal_uInt8& rByte = pScanline[ nX >> 1 ]; @@ -64,7 +64,7 @@ BitmapColor BitmapReadAccess::GetPixelForN4BitLsnPal(ConstScanline pScanline, lo return BitmapColor( ( pScanline[ nX >> 1 ] >> ( nX & 1 ? 4 : 0 ) ) & 0x0f ); } -void BitmapReadAccess::SetPixelForN4BitLsnPal(Scanline pScanline, long nX, const BitmapColor& rBitmapColor, const ColorMask&) +void BitmapReadAccess::SetPixelForN4BitLsnPal(const Scanline pScanline, long nX, const BitmapColor& rBitmapColor, const ColorMask&) { sal_uInt8& rByte = pScanline[ nX >> 1 ]; diff --git a/vcl/source/gdi/pdfwriter_impl.cxx b/vcl/source/gdi/pdfwriter_impl.cxx index 87d536b8f848..e9042a10ec82 100644 --- a/vcl/source/gdi/pdfwriter_impl.cxx +++ b/vcl/source/gdi/pdfwriter_impl.cxx @@ -956,7 +956,7 @@ class Matrix3 { double f[6]; - void set( double *pn ) { for( int i = 0 ; i < 6; i++ ) f[i] = pn[i]; } + void set( const double *pn ) { for( int i = 0 ; i < 6; i++ ) f[i] = pn[i]; } public: Matrix3(); @@ -3053,9 +3053,9 @@ static void appendSubsetName( int nSubsetID, const OUString& rPSName, OStringBuf } sal_Int32 PDFWriterImpl::createToUnicodeCMap( sal_uInt8* pEncoding, - sal_Ucs* pCodeUnits, - sal_Int32* pCodeUnitsPerGlyph, - sal_Int32* pEncToUnicodeIndex, + const sal_Ucs* pCodeUnits, + const sal_Int32* pCodeUnitsPerGlyph, + const sal_Int32* pEncToUnicodeIndex, int nGlyphs ) { int nMapped = 0; @@ -6120,7 +6120,7 @@ my_NSS_CMSSignerInfo_AddAuthAttr(NSSCMSSignerInfo *signerinfo, NSSCMSAttribute * return my_NSS_CMSAttributeArray_AddAttr(signerinfo->cmsg->poolp, &(signerinfo->authAttr), attr); } -NSSCMSMessage *CreateCMSMessage(PRTime* time, +NSSCMSMessage *CreateCMSMessage(const PRTime* time, NSSCMSSignedData **cms_sd, NSSCMSSignerInfo **cms_signer, CERTCertificate *cert, diff --git a/vcl/source/gdi/pdfwriter_impl.hxx b/vcl/source/gdi/pdfwriter_impl.hxx index 0132897f71ee..e356024106c9 100644 --- a/vcl/source/gdi/pdfwriter_impl.hxx +++ b/vcl/source/gdi/pdfwriter_impl.hxx @@ -880,7 +880,8 @@ i12626 /* writes a font descriptor and returns its object id (or 0) */ sal_Int32 emitFontDescriptor( const PhysicalFontFace*, FontSubsetInfo&, sal_Int32 nSubsetID, sal_Int32 nStream ); /* writes a ToUnicode cmap, returns the corresponding stream object */ - sal_Int32 createToUnicodeCMap( sal_uInt8* pEncoding, sal_Ucs* pCodeUnits, sal_Int32* pCodeUnitsPerGlyph, sal_Int32* pEncToUnicodeIndex, int nGlyphs ); + sal_Int32 createToUnicodeCMap( sal_uInt8* pEncoding, const sal_Ucs* pCodeUnits, const sal_Int32* pCodeUnitsPerGlyph, + const sal_Int32* pEncToUnicodeIndex, int nGlyphs ); /* get resource dict object number */ sal_Int32 getResourceDictObj() diff --git a/vcl/source/gdi/salmisc.cxx b/vcl/source/gdi/salmisc.cxx index 4f239efb95c6..0befbf6f3a93 100644 --- a/vcl/source/gdi/salmisc.cxx +++ b/vcl/source/gdi/salmisc.cxx @@ -65,7 +65,7 @@ static long ImplIndexFromColor( const BitmapColor& rCol ) static void ImplPALToPAL( const BitmapBuffer& rSrcBuffer, BitmapBuffer& rDstBuffer, FncGetPixel pFncGetPixel, FncSetPixel pFncSetPixel, - Scanline* pSrcScanMap, Scanline* pDstScanMap, long* pMapX, long* pMapY ) + Scanline* pSrcScanMap, Scanline* pDstScanMap, long* pMapX, const long* pMapY ) { const long nHeight1 = rDstBuffer.mnHeight - 1; const ColorMask& rSrcMask = rSrcBuffer.maColorMask; @@ -98,7 +98,7 @@ static void ImplPALToPAL( const BitmapBuffer& rSrcBuffer, BitmapBuffer& rDstBuff static void ImplPALToTC( const BitmapBuffer& rSrcBuffer, BitmapBuffer& rDstBuffer, FncGetPixel pFncGetPixel, FncSetPixel pFncSetPixel, - Scanline* pSrcScanMap, Scanline* pDstScanMap, long* pMapX, long* pMapY ) + Scanline* pSrcScanMap, Scanline* pDstScanMap, long* pMapX, const long* pMapY ) { const long nHeight1 = rDstBuffer.mnHeight - 1; const ColorMask& rSrcMask = rSrcBuffer.maColorMask; @@ -177,7 +177,7 @@ static void ImplPALToTC( const BitmapBuffer& rSrcBuffer, BitmapBuffer& rDstBuffe static void ImplTCToTC( const BitmapBuffer& rSrcBuffer, BitmapBuffer& rDstBuffer, FncGetPixel pFncGetPixel, FncSetPixel pFncSetPixel, - Scanline* pSrcScanMap, Scanline* pDstScanMap, long* pMapX, long* pMapY ) + Scanline* pSrcScanMap, Scanline* pDstScanMap, long* pMapX, const long* pMapY ) { const long nHeight1 = rDstBuffer.mnHeight - 1; const ColorMask& rSrcMask = rSrcBuffer.maColorMask; @@ -221,7 +221,7 @@ static void ImplTCToTC( const BitmapBuffer& rSrcBuffer, BitmapBuffer& rDstBuffer static void ImplTCToPAL( const BitmapBuffer& rSrcBuffer, BitmapBuffer& rDstBuffer, FncGetPixel pFncGetPixel, FncSetPixel pFncSetPixel, - Scanline* pSrcScanMap, Scanline* pDstScanMap, long* pMapX, long* pMapY ) + Scanline* pSrcScanMap, Scanline* pDstScanMap, long* pMapX, const long* pMapY ) { const long nHeight1 = rDstBuffer.mnHeight- 1; const ColorMask& rSrcMask = rSrcBuffer.maColorMask; |