summaryrefslogtreecommitdiff
path: root/basic
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2016-09-15 15:54:19 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2016-09-16 08:30:26 +0000
commita2b77b43685884fb4e9be04152a49294fa50db36 (patch)
tree00d599e81a653dc5c663f9dd179970b3e6aa11f2 /basic
parent389939b02bde4ea72268960310bbd1f2984200bf (diff)
loplugin:singlevalfields in basic..idl
Also fix obvious bug in the initialisation of the connectivity::odbc::OConnection::m_bClosed field. Probably closes some kind of connection leak there. Change-Id: I04579cf91bcd6d6c51c697d83971da4142743a82 Reviewed-on: https://gerrit.libreoffice.org/28932 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'basic')
-rw-r--r--basic/source/classes/sb.cxx5
-rw-r--r--basic/source/classes/sbunoobj.cxx6
-rw-r--r--basic/source/comp/parser.cxx1
-rw-r--r--basic/source/inc/parser.hxx1
-rw-r--r--basic/source/inc/runtime.hxx1
-rw-r--r--basic/source/inc/sbunoobj.hxx2
-rw-r--r--basic/source/runtime/runtime.cxx1
7 files changed, 2 insertions, 15 deletions
diff --git a/basic/source/classes/sb.cxx b/basic/source/classes/sb.cxx
index 58e683438814..b47c3a864104 100644
--- a/basic/source/classes/sb.cxx
+++ b/basic/source/classes/sb.cxx
@@ -1390,11 +1390,8 @@ void StarBASIC::QuitAndExitApplication()
void StarBASIC::Stop()
{
SbiInstance* p = GetSbData()->pInst;
- while( p )
- {
+ if( p )
p->Stop();
- p = p->pNext;
- }
}
bool StarBASIC::IsRunning()
diff --git a/basic/source/classes/sbunoobj.cxx b/basic/source/classes/sbunoobj.cxx
index 198f14eb9420..8d24420bdd4d 100644
--- a/basic/source/classes/sbunoobj.cxx
+++ b/basic/source/classes/sbunoobj.cxx
@@ -3715,17 +3715,13 @@ static SbUnoServiceCtor* pFirstCtor = nullptr;
void clearUnoServiceCtors()
{
SbUnoServiceCtor* pCtor = pFirstCtor;
- while( pCtor )
- {
+ if( pCtor )
pCtor->SbxValue::Clear();
- pCtor = pCtor->pNext;
- }
}
SbUnoServiceCtor::SbUnoServiceCtor( const OUString& aName_, Reference< XServiceConstructorDescription > const & xServiceCtorDesc )
: SbxMethod( aName_, SbxOBJECT )
, m_xServiceCtorDesc( xServiceCtorDesc )
- , pNext(nullptr)
{
}
diff --git a/basic/source/comp/parser.cxx b/basic/source/comp/parser.cxx
index 2ecc75c8e9c9..70f210d16de3 100644
--- a/basic/source/comp/parser.cxx
+++ b/basic/source/comp/parser.cxx
@@ -118,7 +118,6 @@ SbiParser::SbiParser( StarBASIC* pb, SbModule* pm )
aRtlSyms( aGblStrings, SbRTL, this ),
aGen( *pm, this, 1024 )
{
- eCurExpr = SbSYMBOL;
eEndTok = NIL;
pProc = nullptr;
pStack = nullptr;
diff --git a/basic/source/inc/parser.hxx b/basic/source/inc/parser.hxx
index 8b16d4c94e25..9d2553f67b1b 100644
--- a/basic/source/inc/parser.hxx
+++ b/basic/source/inc/parser.hxx
@@ -69,7 +69,6 @@ public:
SbiSymPool aRtlSyms; // Runtime-Library
SbiCodeGen aGen; // Code-Generator
SbiSymPool* pPool;
- SbiExprType eCurExpr;
short nBase; // OPTION BASE-value
bool bText; // OPTION COMPARE TEXT
bool bExplicit; // true: OPTION EXPLICIT
diff --git a/basic/source/inc/runtime.hxx b/basic/source/inc/runtime.hxx
index 8278f76cbd7f..5a1e8c211d24 100644
--- a/basic/source/inc/runtime.hxx
+++ b/basic/source/inc/runtime.hxx
@@ -154,7 +154,6 @@ class SbiInstance
ComponentVector_t ComponentVector;
public:
SbiRuntime* pRun; // Call-Stack
- SbiInstance* pNext; // instances chain
// #31460 new concept for StepInto/Over/Out,
// explanation see runtime.cxx at SbiInstance::CalcBreakCallLevel()
diff --git a/basic/source/inc/sbunoobj.hxx b/basic/source/inc/sbunoobj.hxx
index e1d64f4b6739..9ec617a7230a 100644
--- a/basic/source/inc/sbunoobj.hxx
+++ b/basic/source/inc/sbunoobj.hxx
@@ -268,8 +268,6 @@ class SbUnoServiceCtor : public SbxMethod
css::uno::Reference< css::reflection::XServiceConstructorDescription > m_xServiceCtorDesc;
- SbUnoServiceCtor* pNext;
-
public:
SbUnoServiceCtor( const OUString& aName_, css::uno::Reference< css::reflection::XServiceConstructorDescription > const & xServiceCtorDesc );
diff --git a/basic/source/runtime/runtime.cxx b/basic/source/runtime/runtime.cxx
index 4f3fd377d0b7..1fba86622b5b 100644
--- a/basic/source/runtime/runtime.cxx
+++ b/basic/source/runtime/runtime.cxx
@@ -322,7 +322,6 @@ SbiInstance::SbiInstance( StarBASIC* p )
, bReschedule(true)
, bCompatibility(false)
, pRun(nullptr)
- , pNext(nullptr)
, nCallLvl(0)
, nBreakCallLvl(0)
{