diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2016-09-15 15:54:19 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2016-09-16 08:30:26 +0000 |
commit | a2b77b43685884fb4e9be04152a49294fa50db36 (patch) | |
tree | 00d599e81a653dc5c663f9dd179970b3e6aa11f2 /basic/source/classes | |
parent | 389939b02bde4ea72268960310bbd1f2984200bf (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/source/classes')
-rw-r--r-- | basic/source/classes/sb.cxx | 5 | ||||
-rw-r--r-- | basic/source/classes/sbunoobj.cxx | 6 |
2 files changed, 2 insertions, 9 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) { } |