diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-06-03 10:52:46 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-06-04 08:23:43 +0200 |
commit | b83ac35bf46ecbebf7f806235eca38a71e521c32 (patch) | |
tree | 660cb00ba4045c7238e9d43176196339ecf901f0 /sfx2 | |
parent | 7b905c8f1d520ae1aaf4bd2fbb6a3325b404ea95 (diff) |
loplugin:simplifypointertobool improve (2)
to look for the
x.get() == null
pattern, which can be simplified to
!x
Change-Id: I0eddf93257ab53ab31949961d7c33ac2dd7288ea
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95400
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sfx2')
-rw-r--r-- | sfx2/source/sidebar/SidebarController.cxx | 2 | ||||
-rw-r--r-- | sfx2/source/view/viewprn.cxx | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/sfx2/source/sidebar/SidebarController.cxx b/sfx2/source/sidebar/SidebarController.cxx index 378a7c47832d..c9526248f755 100644 --- a/sfx2/source/sidebar/SidebarController.cxx +++ b/sfx2/source/sidebar/SidebarController.cxx @@ -658,7 +658,7 @@ void SidebarController::CreateDeck(const OUString& rDeckId, const Context& rCont return; VclPtr<Deck> aDeck = xDeckDescriptor->mpDeck; - if (aDeck.get()==nullptr || bForceCreate) + if (!aDeck || bForceCreate) { if (aDeck) aDeck.disposeAndClear(); diff --git a/sfx2/source/view/viewprn.cxx b/sfx2/source/view/viewprn.cxx index a2d6e6823bf6..f0200f421b91 100644 --- a/sfx2/source/view/viewprn.cxx +++ b/sfx2/source/view/viewprn.cxx @@ -579,7 +579,7 @@ void SfxViewShell::SetPrinter_Impl( VclPtr<SfxPrinter>& pNewPrinter ) void SfxViewShell::StartPrint( const uno::Sequence < beans::PropertyValue >& rProps, bool bIsAPI, bool bIsDirect ) { - assert( pImpl->m_xPrinterController.get() == nullptr ); + assert( !pImpl->m_xPrinterController ); // get the current selection; our controller should know it Reference< frame::XController > xController( GetController() ); |