From 7ceee0f1ec0e349d0df4980d7fdedbd13c7917c5 Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Tue, 9 Oct 2018 10:28:48 +0200 Subject: 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 --- connectivity/source/commontools/CommonTools.cxx | 2 +- connectivity/source/drivers/postgresql/pq_databasemetadata.cxx | 2 +- connectivity/source/drivers/postgresql/pq_tools.cxx | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) (limited to 'connectivity') diff --git a/connectivity/source/commontools/CommonTools.cxx b/connectivity/source/commontools/CommonTools.cxx index 61e14b44aee3..f4562c2d38ed 100644 --- a/connectivity/source/commontools/CommonTools.cxx +++ b/connectivity/source/commontools/CommonTools.cxx @@ -36,7 +36,7 @@ #include using namespace ::comphelper; -static inline sal_Unicode rtl_ascii_toUpperCase( sal_Unicode ch ) +static sal_Unicode rtl_ascii_toUpperCase( sal_Unicode ch ) { return ch >= 0x0061 && ch <= 0x007a ? ch + 0x20 : ch; } diff --git a/connectivity/source/drivers/postgresql/pq_databasemetadata.cxx b/connectivity/source/drivers/postgresql/pq_databasemetadata.cxx index b69a1139c610..0dcde0e3e168 100644 --- a/connectivity/source/drivers/postgresql/pq_databasemetadata.cxx +++ b/connectivity/source/drivers/postgresql/pq_databasemetadata.cxx @@ -1338,7 +1338,7 @@ sal_Int32 typeNameToDataType( const OUString &typeName, const OUString &typtype } namespace { - inline bool isSystemColumn( sal_Int16 attnum ) + bool isSystemColumn( sal_Int16 attnum ) { return attnum <= 0; } diff --git a/connectivity/source/drivers/postgresql/pq_tools.cxx b/connectivity/source/drivers/postgresql/pq_tools.cxx index fc602926e0ef..c88583f95a3b 100644 --- a/connectivity/source/drivers/postgresql/pq_tools.cxx +++ b/connectivity/source/drivers/postgresql/pq_tools.cxx @@ -95,7 +95,7 @@ OUString concatQualified( const OUString & a, const OUString &b) return buf.makeStringAndClear(); } -static inline OString iOUStringToOString( const OUString& str, ConnectionSettings const *settings) { +static OString iOUStringToOString( const OUString& str, ConnectionSettings const *settings) { OSL_ENSURE(settings, "pgsql-sdbc: OUStringToOString got NULL settings"); return OUStringToOString( str, ConnectionSettings::encoding ); } @@ -131,7 +131,7 @@ void bufferEscapeConstant( OUStringBuffer & buf, const OUString & value, Connect buf.append( OStringToOUString( strbuf.makeStringAndClear(), RTL_TEXTENCODING_UTF8 ) ); } -static inline void ibufferQuoteConstant( OUStringBuffer & buf, const OUString & value, ConnectionSettings *settings ) +static void ibufferQuoteConstant( OUStringBuffer & buf, const OUString & value, ConnectionSettings *settings ) { buf.append( "'" ); bufferEscapeConstant( buf, value, settings ); @@ -155,7 +155,7 @@ void bufferQuoteAnyConstant( OUStringBuffer & buf, const Any &val, ConnectionSet buf.append( "NULL" ); } -static inline void ibufferQuoteIdentifier( OUStringBuffer & buf, const OUString &toQuote, ConnectionSettings *settings ) +static void ibufferQuoteIdentifier( OUStringBuffer & buf, const OUString &toQuote, ConnectionSettings *settings ) { OSL_ENSURE(settings, "pgsql-sdbc: bufferQuoteIdentifier got NULL settings"); -- cgit