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/unx/generic/dtrans | |
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/unx/generic/dtrans')
-rw-r--r-- | vcl/unx/generic/dtrans/bmp.cxx | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/vcl/unx/generic/dtrans/bmp.cxx b/vcl/unx/generic/dtrans/bmp.cxx index 7f3f27022099..57399b238c89 100644 --- a/vcl/unx/generic/dtrans/bmp.cxx +++ b/vcl/unx/generic/dtrans/bmp.cxx @@ -41,13 +41,13 @@ using namespace x11; * helper functions */ -static inline void writeLE( sal_uInt16 nNumber, sal_uInt8* pBuffer ) +static void writeLE( sal_uInt16 nNumber, sal_uInt8* pBuffer ) { pBuffer[ 0 ] = (nNumber & 0xff); pBuffer[ 1 ] = ((nNumber>>8)&0xff); } -static inline void writeLE( sal_uInt32 nNumber, sal_uInt8* pBuffer ) +static void writeLE( sal_uInt32 nNumber, sal_uInt8* pBuffer ) { pBuffer[ 0 ] = (nNumber & 0xff); pBuffer[ 1 ] = ((nNumber>>8)&0xff); @@ -55,7 +55,7 @@ static inline void writeLE( sal_uInt32 nNumber, sal_uInt8* pBuffer ) pBuffer[ 3 ] = ((nNumber>>24)&0xff); } -static inline sal_uInt16 readLE16( const sal_uInt8* pBuffer ) +static sal_uInt16 readLE16( const sal_uInt8* pBuffer ) { //This is untainted data which comes from a controlled source //so, using a byte-swapping pattern which coverity doesn't @@ -66,7 +66,7 @@ static inline sal_uInt16 readLE16( const sal_uInt8* pBuffer ) return v; } -static inline sal_uInt32 readLE32( const sal_uInt8* pBuffer ) +static sal_uInt32 readLE32( const sal_uInt8* pBuffer ) { //This is untainted data which comes from a controlled source //so, using a byte-swapping pattern which coverity doesn't @@ -83,7 +83,7 @@ static inline sal_uInt32 readLE32( const sal_uInt8* pBuffer ) * scanline helpers */ -static inline void X11_writeScanlinePixel( unsigned long nColor, sal_uInt8* pScanline, int depth, int x ) +static void X11_writeScanlinePixel( unsigned long nColor, sal_uInt8* pScanline, int depth, int x ) { switch( depth ) { @@ -194,12 +194,12 @@ static sal_uInt8* X11_getPaletteBmpFromImage( return pBuffer; } -static inline unsigned long doRightShift( unsigned long nValue, int nShift ) +static unsigned long doRightShift( unsigned long nValue, int nShift ) { return (nShift > 0) ? (nValue >> nShift) : (nValue << (-nShift)); } -static inline unsigned long doLeftShift( unsigned long nValue, int nShift ) +static unsigned long doLeftShift( unsigned long nValue, int nShift ) { return (nShift > 0) ? (nValue << nShift) : (nValue >> (-nShift)); } |