From 38187ec15b6cbaedcadcbd8f3bcb632a5c6be88f Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Thu, 6 Dec 2018 11:37:51 +0200 Subject: loplugin:singlevalfields extend to all static vars Change-Id: Ic238bb5291539fd1b7e98cb4afc9b25f37e7d528 Reviewed-on: https://gerrit.libreoffice.org/64710 Tested-by: Jenkins Reviewed-by: Noel Grandin --- basic/source/classes/sbunoobj.cxx | 9 --------- basic/source/classes/sbxmod.cxx | 1 - basic/source/inc/sbunoobj.hxx | 3 --- basic/source/runtime/methods.cxx | 8 ++++---- 4 files changed, 4 insertions(+), 17 deletions(-) (limited to 'basic') diff --git a/basic/source/classes/sbunoobj.cxx b/basic/source/classes/sbunoobj.cxx index 21e57c5d206b..f3c276d88003 100644 --- a/basic/source/classes/sbunoobj.cxx +++ b/basic/source/classes/sbunoobj.cxx @@ -3657,15 +3657,6 @@ void SbUnoService::Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) } -static SbUnoServiceCtor* pFirstCtor = nullptr; - -void clearUnoServiceCtors() -{ - SbUnoServiceCtor* pCtor = pFirstCtor; - if( pCtor ) - pCtor->SbxValue::Clear(); -} - SbUnoServiceCtor::SbUnoServiceCtor( const OUString& aName_, Reference< XServiceConstructorDescription > const & xServiceCtorDesc ) : SbxMethod( aName_, SbxOBJECT ) , m_xServiceCtorDesc( xServiceCtorDesc ) diff --git a/basic/source/classes/sbxmod.cxx b/basic/source/classes/sbxmod.cxx index 8fb9d12a5ce0..db86e597b12b 100644 --- a/basic/source/classes/sbxmod.cxx +++ b/basic/source/classes/sbxmod.cxx @@ -973,7 +973,6 @@ static void ClearUnoObjectsInRTL_Impl( StarBASIC* pBasic ) { // #67781 Delete return values of the Uno-methods clearUnoMethods(); - clearUnoServiceCtors(); ClearUnoObjectsInRTL_Impl_Rek( pBasic ); diff --git a/basic/source/inc/sbunoobj.hxx b/basic/source/inc/sbunoobj.hxx index d9c654b77d23..8cc966da66fa 100644 --- a/basic/source/inc/sbunoobj.hxx +++ b/basic/source/inc/sbunoobj.hxx @@ -259,12 +259,9 @@ public: SbUnoService* findUnoService( const OUString& rName ); -void clearUnoServiceCtors(); - class SbUnoServiceCtor : public SbxMethod { friend class SbUnoService; - friend void clearUnoServiceCtors(); css::uno::Reference< css::reflection::XServiceConstructorDescription > m_xServiceCtorDesc; diff --git a/basic/source/runtime/methods.cxx b/basic/source/runtime/methods.cxx index c137909935b0..0ecced15e6b3 100644 --- a/basic/source/runtime/methods.cxx +++ b/basic/source/runtime/methods.cxx @@ -2508,10 +2508,10 @@ void SbRtl_IsMissing(StarBASIC *, SbxArray & rPar, bool) // Function looks for wildcards, removes them and always returns the pure path static OUString implSetupWildcard(const OUString& rFileParam, SbiRTLData& rRTLData) { - static sal_Char cDelim1 = '/'; - static sal_Char cDelim2 = '\\'; - static sal_Char cWild1 = '*'; - static sal_Char cWild2 = '?'; + static const sal_Char cDelim1 = '/'; + static const sal_Char cDelim2 = '\\'; + static const sal_Char cWild1 = '*'; + static const sal_Char cWild2 = '?'; rRTLData.pWildCard.reset(); rRTLData.sFullNameToBeChecked.clear(); -- cgit v1.2.3