diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2018-10-09 10:28:48 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2018-10-09 14:47:17 +0200 |
commit | 7ceee0f1ec0e349d0df4980d7fdedbd13c7917c5 (patch) | |
tree | 616ab419fe0f01e94740de7faacb393775420589 /vcl/source/gdi | |
parent | 664db0d945fbb23e115eeea8377e3a4e88541da1 (diff) |
Extend loplugin:redundantinline to catch inline functions w/o external linkage
...where "inline" (in its meaning of "this function can be defined in multiple
translation units") thus doesn't make much sense. (As discussed in
compilerplugins/clang/redundantinline.cxx, exempt such "static inline" functions
in include files for now.)
All the rewriting has been done automatically by the plugin, except for one
instance in sw/source/ui/frmdlg/column.cxx that used to involve an #if), plus
some subsequent solenv/clang-format/reformat-formatted-files.
Change-Id: Ib8b996b651aeafc03bbdc8890faa05ed50517224
Reviewed-on: https://gerrit.libreoffice.org/61573
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'vcl/source/gdi')
-rw-r--r-- | vcl/source/gdi/bmpfast.cxx | 18 | ||||
-rw-r--r-- | vcl/source/gdi/dibtools.cxx | 4 | ||||
-rw-r--r-- | vcl/source/gdi/metaact.cxx | 8 | ||||
-rw-r--r-- | vcl/source/gdi/pdfwriter_impl.cxx | 6 | ||||
-rw-r--r-- | vcl/source/gdi/pdfwriter_impl2.cxx | 2 | ||||
-rw-r--r-- | vcl/source/gdi/region.cxx | 2 | ||||
-rw-r--r-- | vcl/source/gdi/sallayout.cxx | 2 | ||||
-rw-r--r-- | vcl/source/gdi/scrptrun.cxx | 2 |
8 files changed, 22 insertions, 22 deletions
diff --git a/vcl/source/gdi/bmpfast.cxx b/vcl/source/gdi/bmpfast.cxx index 76f083663ba0..93318fbd30ae 100644 --- a/vcl/source/gdi/bmpfast.cxx +++ b/vcl/source/gdi/bmpfast.cxx @@ -232,7 +232,7 @@ class TrueColorPixelPtr<ScanlineFormat::N8BitPal> // converting truecolor formats template <ScanlineFormat SRCFMT, ScanlineFormat DSTFMT> -static inline void ImplConvertPixel( const TrueColorPixelPtr<DSTFMT>& rDst, +static void ImplConvertPixel( const TrueColorPixelPtr<DSTFMT>& rDst, const TrueColorPixelPtr<SRCFMT>& rSrc ) { rDst.SetColor( rSrc.GetRed(), rSrc.GetGreen(), rSrc.GetBlue() ); @@ -240,7 +240,7 @@ static inline void ImplConvertPixel( const TrueColorPixelPtr<DSTFMT>& rDst, } template <> -inline void ImplConvertPixel<ScanlineFormat::N16BitTcLsbMask, ScanlineFormat::N16BitTcMsbMask> ( +void ImplConvertPixel<ScanlineFormat::N16BitTcLsbMask, ScanlineFormat::N16BitTcMsbMask> ( const TrueColorPixelPtr<ScanlineFormat::N16BitTcMsbMask>& rDst, const TrueColorPixelPtr<ScanlineFormat::N16BitTcLsbMask>& rSrc ) { @@ -252,7 +252,7 @@ inline void ImplConvertPixel<ScanlineFormat::N16BitTcLsbMask, ScanlineFormat::N1 } template <ScanlineFormat SRCFMT, ScanlineFormat DSTFMT> -static inline void ImplConvertLine( const TrueColorPixelPtr<DSTFMT>& rDst, +static void ImplConvertLine( const TrueColorPixelPtr<DSTFMT>& rDst, const TrueColorPixelPtr<SRCFMT>& rSrc, int nPixelCount ) { TrueColorPixelPtr<DSTFMT> aDst( rDst ); @@ -267,7 +267,7 @@ static inline void ImplConvertLine( const TrueColorPixelPtr<DSTFMT>& rDst, // alpha blending truecolor pixels template <ScanlineFormat SRCFMT, ScanlineFormat DSTFMT> -static inline void ImplBlendPixels( const TrueColorPixelPtr<DSTFMT>& rDst, +static void ImplBlendPixels( const TrueColorPixelPtr<DSTFMT>& rDst, const TrueColorPixelPtr<SRCFMT>& rSrc, unsigned nAlphaVal ) { static const unsigned nAlphaShift = 8; @@ -294,7 +294,7 @@ static inline void ImplBlendPixels( const TrueColorPixelPtr<DSTFMT>& rDst, } template <ScanlineFormat MASKFMT, ScanlineFormat SRCFMT, ScanlineFormat DSTFMT> -static inline void ImplBlendLines( const TrueColorPixelPtr<DSTFMT>& rDst, +static void ImplBlendLines( const TrueColorPixelPtr<DSTFMT>& rDst, const TrueColorPixelPtr<SRCFMT>& rSrc, const TrueColorPixelPtr<MASKFMT>& rMsk, int nPixelCount ) { @@ -376,7 +376,7 @@ static bool ImplConvertToBitmap( TrueColorPixelPtr<SRCFMT>& rSrcLine, } template <ScanlineFormat SRCFMT> -static inline bool ImplConvertFromBitmap( BitmapBuffer& rDst, const BitmapBuffer& rSrc ) +static bool ImplConvertFromBitmap( BitmapBuffer& rDst, const BitmapBuffer& rSrc ) { TrueColorPixelPtr<SRCFMT> aSrcType; aSrcType.SetRawPtr( rSrc.mpBits ); @@ -581,7 +581,7 @@ static bool ImplBlendToBitmap( TrueColorPixelPtr<SRCFMT>& rSrcLine, // some specializations to reduce the code size template <> -inline bool ImplBlendToBitmap<ScanlineFormat::N24BitTcBgr,ScanlineFormat::N24BitTcBgr>( +bool ImplBlendToBitmap<ScanlineFormat::N24BitTcBgr,ScanlineFormat::N24BitTcBgr>( TrueColorPixelPtr<ScanlineFormat::N24BitTcBgr>&, BitmapBuffer& rDstBuffer, const BitmapBuffer& rSrcBuffer, const BitmapBuffer& rMskBuffer ) @@ -591,7 +591,7 @@ inline bool ImplBlendToBitmap<ScanlineFormat::N24BitTcBgr,ScanlineFormat::N24Bit } template <> -inline bool ImplBlendToBitmap<ScanlineFormat::N32BitTcAbgr,ScanlineFormat::N32BitTcAbgr>( +bool ImplBlendToBitmap<ScanlineFormat::N32BitTcAbgr,ScanlineFormat::N32BitTcAbgr>( TrueColorPixelPtr<ScanlineFormat::N32BitTcAbgr>&, BitmapBuffer& rDstBuffer, const BitmapBuffer& rSrcBuffer, const BitmapBuffer& rMskBuffer ) @@ -601,7 +601,7 @@ inline bool ImplBlendToBitmap<ScanlineFormat::N32BitTcAbgr,ScanlineFormat::N32Bi } template <> -inline bool ImplBlendToBitmap<ScanlineFormat::N32BitTcBgra,ScanlineFormat::N32BitTcBgra>( +bool ImplBlendToBitmap<ScanlineFormat::N32BitTcBgra,ScanlineFormat::N32BitTcBgra>( TrueColorPixelPtr<ScanlineFormat::N32BitTcBgra>&, BitmapBuffer& rDstBuffer, const BitmapBuffer& rSrcBuffer, const BitmapBuffer& rMskBuffer ) diff --git a/vcl/source/gdi/dibtools.cxx b/vcl/source/gdi/dibtools.cxx index 62262bae7990..1b4c13458ea6 100644 --- a/vcl/source/gdi/dibtools.cxx +++ b/vcl/source/gdi/dibtools.cxx @@ -135,14 +135,14 @@ struct DIBV5Header : public DIBInfoHeader {} }; -inline sal_uInt16 discretizeBitcount( sal_uInt16 nInputCount ) +sal_uInt16 discretizeBitcount( sal_uInt16 nInputCount ) { return ( nInputCount <= 1 ) ? 1 : ( nInputCount <= 4 ) ? 4 : ( nInputCount <= 8 ) ? 8 : 24; } -inline bool isBitfieldCompression( ScanlineFormat nScanlineFormat ) +bool isBitfieldCompression( ScanlineFormat nScanlineFormat ) { return (ScanlineFormat::N16BitTcLsbMask == nScanlineFormat) || (ScanlineFormat::N32BitTcMask == nScanlineFormat); } diff --git a/vcl/source/gdi/metaact.cxx b/vcl/source/gdi/metaact.cxx index 5a733c8dd9f2..8a6bbbd5cf76 100644 --- a/vcl/source/gdi/metaact.cxx +++ b/vcl/source/gdi/metaact.cxx @@ -108,13 +108,13 @@ meta_action_name(MetaActionType nMetaAction) #endif } -inline void ImplScalePoint( Point& rPt, double fScaleX, double fScaleY ) +void ImplScalePoint( Point& rPt, double fScaleX, double fScaleY ) { rPt.setX( FRound( fScaleX * rPt.X() ) ); rPt.setY( FRound( fScaleY * rPt.Y() ) ); } -inline void ImplScaleRect( tools::Rectangle& rRect, double fScaleX, double fScaleY ) +void ImplScaleRect( tools::Rectangle& rRect, double fScaleX, double fScaleY ) { Point aTL( rRect.TopLeft() ); Point aBR( rRect.BottomRight() ); @@ -126,13 +126,13 @@ inline void ImplScaleRect( tools::Rectangle& rRect, double fScaleX, double fScal rRect.Justify(); } -inline void ImplScalePoly( tools::Polygon& rPoly, double fScaleX, double fScaleY ) +void ImplScalePoly( tools::Polygon& rPoly, double fScaleX, double fScaleY ) { for( sal_uInt16 i = 0, nCount = rPoly.GetSize(); i < nCount; i++ ) ImplScalePoint( rPoly[ i ], fScaleX, fScaleY ); } -inline void ImplScaleLineInfo( LineInfo& rLineInfo, double fScaleX, double fScaleY ) +void ImplScaleLineInfo( LineInfo& rLineInfo, double fScaleX, double fScaleY ) { if( !rLineInfo.IsDefault() ) { diff --git a/vcl/source/gdi/pdfwriter_impl.cxx b/vcl/source/gdi/pdfwriter_impl.cxx index 59c605349dc1..a70c73c3a2ed 100644 --- a/vcl/source/gdi/pdfwriter_impl.cxx +++ b/vcl/source/gdi/pdfwriter_impl.cxx @@ -508,8 +508,8 @@ void doTestCode() static const sal_Int32 nLog10Divisor = 3; static const double fDivisor = 1000.0; -static inline double pixelToPoint( double px ) { return px/fDivisor; } -static inline sal_Int32 pointToPixel( double pt ) { return sal_Int32(pt*fDivisor); } +static double pixelToPoint( double px ) { return px/fDivisor; } +static sal_Int32 pointToPixel( double pt ) { return sal_Int32(pt*fDivisor); } const sal_uInt8 PDFWriterImpl::s_nPadString[32] = { @@ -4093,7 +4093,7 @@ sal_Int32 PDFWriterImpl::getBestBuiltinFont( const vcl::Font& rFont ) return nBest; } -static inline const Color& replaceColor( const Color& rCol1, const Color& rCol2 ) +static const Color& replaceColor( const Color& rCol1, const Color& rCol2 ) { return (rCol1 == COL_TRANSPARENT) ? rCol2 : rCol1; } diff --git a/vcl/source/gdi/pdfwriter_impl2.cxx b/vcl/source/gdi/pdfwriter_impl2.cxx index 59448f1f8635..a4ce58af0e20 100644 --- a/vcl/source/gdi/pdfwriter_impl2.cxx +++ b/vcl/source/gdi/pdfwriter_impl2.cxx @@ -1547,7 +1547,7 @@ static const long setRun[256] = 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 6, 6, 7, 8, /* 0xf0 - 0xff */ }; -static inline bool isSet( const Scanline i_pLine, long i_nIndex ) +static bool isSet( const Scanline i_pLine, long i_nIndex ) { return (i_pLine[ i_nIndex/8 ] & (0x80 >> (i_nIndex&7))) != 0; } diff --git a/vcl/source/gdi/region.cxx b/vcl/source/gdi/region.cxx index 5af7829b0e03..ce2d60ba7d66 100644 --- a/vcl/source/gdi/region.cxx +++ b/vcl/source/gdi/region.cxx @@ -1677,7 +1677,7 @@ void vcl::Region::GetRegionRectangles(RectangleVector& rTarget) const } } -static inline bool ImplPolygonRectTest( const tools::Polygon& rPoly, tools::Rectangle* pRectOut = nullptr ) +static bool ImplPolygonRectTest( const tools::Polygon& rPoly, tools::Rectangle* pRectOut = nullptr ) { bool bIsRect = false; const Point* pPoints = rPoly.GetConstPointAry(); diff --git a/vcl/source/gdi/sallayout.cxx b/vcl/source/gdi/sallayout.cxx index e2fd9aeb88a3..510120b9c068 100644 --- a/vcl/source/gdi/sallayout.cxx +++ b/vcl/source/gdi/sallayout.cxx @@ -210,7 +210,7 @@ sal_UCS4 GetLocalizedChar( sal_UCS4 nChar, LanguageType eLang ) return nChar; } -static inline bool IsControlChar( sal_UCS4 cChar ) +static bool IsControlChar( sal_UCS4 cChar ) { // C0 control characters if( (0x0001 <= cChar) && (cChar <= 0x001F) ) diff --git a/vcl/source/gdi/scrptrun.cxx b/vcl/source/gdi/scrptrun.cxx index 38db1ac2fa35..cbf16d6e85bd 100644 --- a/vcl/source/gdi/scrptrun.cxx +++ b/vcl/source/gdi/scrptrun.cxx @@ -124,7 +124,7 @@ namespace vcl { const char ScriptRun::fgClassID=0; -static inline UBool sameScript(int32_t scriptOne, int32_t scriptTwo) +static UBool sameScript(int32_t scriptOne, int32_t scriptTwo) { return scriptOne <= USCRIPT_INHERITED || scriptTwo <= USCRIPT_INHERITED || scriptOne == scriptTwo; } |