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 /stoc/source/security | |
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 'stoc/source/security')
-rw-r--r-- | stoc/source/security/access_controller.cxx | 26 | ||||
-rw-r--r-- | stoc/source/security/permissions.cxx | 6 |
2 files changed, 16 insertions, 16 deletions
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() ) |