summaryrefslogtreecommitdiffstats
path: root/stoc
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2018-10-09 10:28:48 +0200
committerStephan Bergmann <sbergman@redhat.com>2018-10-09 14:47:17 +0200
commit7ceee0f1ec0e349d0df4980d7fdedbd13c7917c5 (patch)
tree616ab419fe0f01e94740de7faacb393775420589 /stoc
parentloplugin:unusedmethods (diff)
downloadcore-7ceee0f1ec0e349d0df4980d7fdedbd13c7917c5.tar.gz
core-7ceee0f1ec0e349d0df4980d7fdedbd13c7917c5.zip
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 'stoc')
-rw-r--r--stoc/source/invocation/invocation.cxx2
-rw-r--r--stoc/source/invocation_adapterfactory/iafactory.cxx6
-rw-r--r--stoc/source/proxy_factory/proxyfac.cxx8
-rw-r--r--stoc/source/security/access_controller.cxx26
-rw-r--r--stoc/source/security/permissions.cxx6
-rw-r--r--stoc/source/servicemanager/servicemanager.cxx8
-rw-r--r--stoc/source/typeconv/convert.cxx4
7 files changed, 30 insertions, 30 deletions
diff --git a/stoc/source/invocation/invocation.cxx b/stoc/source/invocation/invocation.cxx
index 5ab63c36b7d7..6cc658415bd6 100644
--- a/stoc/source/invocation/invocation.cxx
+++ b/stoc/source/invocation/invocation.cxx
@@ -80,7 +80,7 @@ static OUString inv_getImplementationName()
}
// TODO: Implement centrally
-static inline Reference<XIdlClass> TypeToIdlClass( const Type& rType, const Reference< XIdlReflection > & xRefl )
+static Reference<XIdlClass> TypeToIdlClass( const Type& rType, const Reference< XIdlReflection > & xRefl )
{
return xRefl->forName( rType.getTypeName() );
}
diff --git a/stoc/source/invocation_adapterfactory/iafactory.cxx b/stoc/source/invocation_adapterfactory/iafactory.cxx
index 83a99da39f66..52d2eb3ff2d5 100644
--- a/stoc/source/invocation_adapterfactory/iafactory.cxx
+++ b/stoc/source/invocation_adapterfactory/iafactory.cxx
@@ -208,7 +208,7 @@ inline void AdapterImpl::release()
}
-static inline void constructRuntimeException(
+static void constructRuntimeException(
uno_Any * pExc, const OUString & rMsg )
{
RuntimeException exc( rMsg );
@@ -218,7 +218,7 @@ static inline void constructRuntimeException(
}
-static inline bool type_equals(
+static bool type_equals(
typelib_TypeDescriptionReference * pType1,
typelib_TypeDescriptionReference * pType2 )
{
@@ -755,7 +755,7 @@ FactoryImpl::~FactoryImpl()
}
-static inline AdapterImpl * lookup_adapter(
+static AdapterImpl * lookup_adapter(
t_ptr_set ** pp_adapter_set,
t_ptr_map & map, void * key, Sequence< Type > const & rTypes )
{
diff --git a/stoc/source/proxy_factory/proxyfac.cxx b/stoc/source/proxy_factory/proxyfac.cxx
index 0e3d35937b15..57b0f2a05418 100644
--- a/stoc/source/proxy_factory/proxyfac.cxx
+++ b/stoc/source/proxy_factory/proxyfac.cxx
@@ -164,7 +164,7 @@ struct ProxyRoot : public ::cppu::OWeakAggObject
// XAggregation
virtual Any SAL_CALL queryAggregation( Type const & rType ) override;
- inline ProxyRoot( ::rtl::Reference< FactoryImpl > const & factory,
+ ProxyRoot( ::rtl::Reference< FactoryImpl > const & factory,
Reference< XInterface > const & xTarget );
::rtl::Reference< FactoryImpl > m_factory;
@@ -182,7 +182,7 @@ struct binuno_Proxy : public uno_Interface
OUString const m_oid;
TypeDescription m_typeDescr;
- inline binuno_Proxy(
+ binuno_Proxy(
::rtl::Reference< ProxyRoot > const & root,
UnoInterfaceReference const & target,
OUString const & oid, TypeDescription const & typeDescr );
@@ -281,7 +281,7 @@ static void binuno_proxy_dispatch(
}
-inline binuno_Proxy::binuno_Proxy(
+binuno_Proxy::binuno_Proxy(
::rtl::Reference< ProxyRoot > const & root,
UnoInterfaceReference const & target,
OUString const & oid, TypeDescription const & typeDescr )
@@ -296,7 +296,7 @@ inline binuno_Proxy::binuno_Proxy(
uno_Interface::pDispatcher = binuno_proxy_dispatch;
}
-inline ProxyRoot::ProxyRoot(
+ProxyRoot::ProxyRoot(
::rtl::Reference< FactoryImpl > const & factory,
Reference< XInterface > const & xTarget )
: m_factory( factory )
diff --git a/stoc/source/security/access_controller.cxx b/stoc/source/security/access_controller.cxx
index c169444d731c..e2e2bc565598 100644
--- a/stoc/source/security/access_controller.cxx
+++ b/stoc/source/security/access_controller.cxx
@@ -76,12 +76,12 @@ class acc_Intersection
{
Reference< security::XAccessControlContext > m_x1, m_x2;
- inline acc_Intersection(
+ acc_Intersection(
Reference< security::XAccessControlContext > const & x1,
Reference< security::XAccessControlContext > const & x2 );
public:
- static inline Reference< security::XAccessControlContext > create(
+ static Reference< security::XAccessControlContext > create(
Reference< security::XAccessControlContext > const & x1,
Reference< security::XAccessControlContext > const & x2 );
@@ -90,14 +90,14 @@ public:
Any const & perm ) override;
};
-inline acc_Intersection::acc_Intersection(
+acc_Intersection::acc_Intersection(
Reference< security::XAccessControlContext > const & x1,
Reference< security::XAccessControlContext > const & x2 )
: m_x1( x1 )
, m_x2( x2 )
{}
-inline Reference< security::XAccessControlContext > acc_Intersection::create(
+Reference< security::XAccessControlContext > acc_Intersection::create(
Reference< security::XAccessControlContext > const & x1,
Reference< security::XAccessControlContext > const & x2 )
{
@@ -122,12 +122,12 @@ class acc_Union
{
Reference< security::XAccessControlContext > m_x1, m_x2;
- inline acc_Union(
+ acc_Union(
Reference< security::XAccessControlContext > const & x1,
Reference< security::XAccessControlContext > const & x2 );
public:
- static inline Reference< security::XAccessControlContext > create(
+ static Reference< security::XAccessControlContext > create(
Reference< security::XAccessControlContext > const & x1,
Reference< security::XAccessControlContext > const & x2 );
@@ -136,14 +136,14 @@ public:
Any const & perm ) override;
};
-inline acc_Union::acc_Union(
+acc_Union::acc_Union(
Reference< security::XAccessControlContext > const & x1,
Reference< security::XAccessControlContext > const & x2 )
: m_x1( x1 )
, m_x2( x2 )
{}
-inline Reference< security::XAccessControlContext > acc_Union::create(
+Reference< security::XAccessControlContext > acc_Union::create(
Reference< security::XAccessControlContext > const & x1,
Reference< security::XAccessControlContext > const & x2 )
{
@@ -200,7 +200,7 @@ class acc_CurrentContext
Any m_restriction;
public:
- inline acc_CurrentContext(
+ acc_CurrentContext(
Reference< XCurrentContext > const & xDelegate,
Reference< security::XAccessControlContext > const & xRestriction );
@@ -208,7 +208,7 @@ public:
virtual Any SAL_CALL getValueByName( OUString const & name ) override;
};
-inline acc_CurrentContext::acc_CurrentContext(
+acc_CurrentContext::acc_CurrentContext(
Reference< XCurrentContext > const & xDelegate,
Reference< security::XAccessControlContext > const & xRestriction )
: m_xDelegate( xDelegate )
@@ -237,7 +237,7 @@ Any acc_CurrentContext::getValueByName( OUString const & name )
}
-inline Reference< security::XAccessControlContext > getDynamicRestriction(
+Reference< security::XAccessControlContext > getDynamicRestriction(
Reference< XCurrentContext > const & xContext )
{
if (xContext.is())
@@ -305,7 +305,7 @@ class AccessController
ThreadData m_rec;
typedef vector< pair< OUString, Any > > t_rec_vec;
- inline void clearPostPoned();
+ void clearPostPoned();
void checkAndClearPostPoned();
PermissionCollection getEffectivePermissions(
@@ -483,7 +483,7 @@ static void dumpPermissions(
#endif
-inline void AccessController::clearPostPoned()
+void AccessController::clearPostPoned()
{
delete static_cast< t_rec_vec * >( m_rec.getData() );
m_rec.setData( nullptr );
diff --git a/stoc/source/security/permissions.cxx b/stoc/source/security/permissions.cxx
index fdf97cb0817b..1390275b3246 100644
--- a/stoc/source/security/permissions.cxx
+++ b/stoc/source/security/permissions.cxx
@@ -47,7 +47,7 @@ namespace stoc_sec
{
-static inline sal_Int32 makeMask(
+static sal_Int32 makeMask(
OUString const & items, char const * const * strings )
{
sal_Int32 mask = 0;
@@ -79,7 +79,7 @@ static inline sal_Int32 makeMask(
return mask;
}
-static inline OUString makeStrings(
+static OUString makeStrings(
sal_Int32 mask, char const * const * strings )
{
OUStringBuffer buf( 48 );
@@ -513,7 +513,7 @@ Sequence< OUString > PermissionCollection::toStrings() const
}
#endif
-inline static bool implies(
+static bool implies(
::rtl::Reference< Permission > const & head, Permission const & demanded )
{
for ( Permission * perm = head.get(); perm; perm = perm->m_next.get() )
diff --git a/stoc/source/servicemanager/servicemanager.cxx b/stoc/source/servicemanager/servicemanager.cxx
index d8447a88750a..43aadfff0fbf 100644
--- a/stoc/source/servicemanager/servicemanager.cxx
+++ b/stoc/source/servicemanager/servicemanager.cxx
@@ -411,8 +411,8 @@ public:
void SAL_CALL removeVetoableChangeListener(const OUString& PropertyName, const Reference<XVetoableChangeListener >& aListener) override;
protected:
- inline bool is_disposed() const;
- inline void check_undisposed() const;
+ bool is_disposed() const;
+ void check_undisposed() const;
virtual void SAL_CALL disposing() override;
bool haveFactoryWithThisImplementation(const OUString& aImplName);
@@ -440,14 +440,14 @@ private:
};
-inline bool OServiceManager::is_disposed() const
+bool OServiceManager::is_disposed() const
{
// ought to be guarded by m_mutex:
return (m_bInDisposing || rBHelper.bDisposed);
}
-inline void OServiceManager::check_undisposed() const
+void OServiceManager::check_undisposed() const
{
if (is_disposed())
{
diff --git a/stoc/source/typeconv/convert.cxx b/stoc/source/typeconv/convert.cxx
index 919a5edc7818..67aa604cef6c 100644
--- a/stoc/source/typeconv/convert.cxx
+++ b/stoc/source/typeconv/convert.cxx
@@ -76,14 +76,14 @@ static inline double unsigned_int64_to_double( sal_uInt64 n )
static const double DOUBLE_SAL_UINT64_MAX =
double(((sal_uInt64(0xffffffff)) << 32) | sal_uInt64(0xffffffff));
-static inline double unsigned_int64_to_double( sal_uInt64 n )
+static double unsigned_int64_to_double( sal_uInt64 n )
{
return static_cast<double>(n);
}
#endif
-static inline double round( double aVal )
+static double round( double aVal )
{
bool bPos = (aVal >= 0.0);
aVal = ::fabs( aVal );