loplugin:simplifypointertobool improve

Desktop / LibreOffice - Noel Grandin [collabora.co.uk] - 3 June 2020 08:51 UTC

to look for the x.get() != null pattern, which can be simplified to x

I'll do the x.get() == nullptr pattern in a separate patch, to reduce the chances of a mistake

Change-Id: I45e0d178e75359857cdf50d712039cb526016555 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95354

054c0e7177cb loplugin:simplifypointertobool improve
.../source/standard/vclxaccessiblecombobox.cxx | 2 +-
.../standard/vclxaccessibledropdowncombobox.cxx | 2 +-
.../standard/vclxaccessibledropdownlistbox.cxx | 2 +-
.../source/standard/vclxaccessiblelistbox.cxx | 2 +-
basic/qa/cppunit/basictest.cxx | 2 +-
comphelper/source/misc/configuration.cxx | 8 +--
compilerplugins/clang/simplifypointertobool.cxx | 35 +++++++++-
.../clang/test/simplifypointertobool.cxx | 39 +++++++++++
cppcanvas/source/mtfrenderer/implrenderer.cxx | 2 +-
cppcanvas/source/tools/canvasgraphichelper.cxx | 3 +-
cppcanvas/source/wrapper/basegfxfactory.cxx | 9 +--
cppcanvas/source/wrapper/implbitmap.cxx | 6 +-
cppcanvas/source/wrapper/implpolypolygon.cxx | 3 +-
cppcanvas/source/wrapper/vclfactory.cxx | 3 +-
cppuhelper/source/servicemanager.cxx | 22 +++----
extensions/source/propctrlr/browserlistbox.cxx | 2 +-
extensions/source/propctrlr/propcontroller.hxx | 2 +-
include/oox/ole/axcontrol.hxx | 2 +-
oox/source/ppt/pptshape.cxx | 4 +-
oox/source/shape/ShapeContextHandler.cxx | 2 +-
sc/inc/document.hxx | 2 +-
sc/qa/extras/scpdfexport.cxx | 4 +-
sc/qa/unit/bugfix-test.cxx | 2 +-
sc/qa/unit/copy_paste_test.cxx | 4 +-
sc/qa/unit/ucalc_formula.cxx | 4 +-
sc/source/core/data/document10.cxx | 2 +-
sc/source/filter/excel/xecontent.cxx | 2 +-
sc/source/filter/excel/xilink.cxx | 2 +-
sc/source/filter/inc/richstring.hxx | 2 +-
sc/source/ui/unoobj/linkuno.cxx | 2 +-
sd/source/core/EffectMigration.cxx | 2 +-
.../accessibility/AccessibleSlideSorterObject.cxx | 2 +-
.../ui/accessibility/AccessibleSlideSorterView.cxx | 4 +-
sd/source/ui/animations/CustomAnimationList.cxx | 2 +-
sd/source/ui/animations/CustomAnimationPane.cxx | 2 +-
sd/source/ui/animations/motionpathtag.cxx | 2 +-
.../ui/framework/factories/FullScreenPane.cxx | 2 +-
sd/source/ui/framework/factories/Pane.cxx | 2 +-
sd/source/ui/presenter/PresenterHelper.cxx | 4 +-
sd/source/ui/presenter/SlideRenderer.cxx | 2 +-
sd/source/ui/sidebar/MasterPageContainer.cxx | 24 +++----
sd/source/ui/sidebar/MasterPageContainerQueue.cxx | 4 +-
sd/source/ui/sidebar/PanelBase.cxx | 2 +-
.../ui/slidesorter/cache/SlsQueueProcessor.cxx | 4 +-
.../controller/SlideSorterController.cxx | 4 +-
.../ui/slidesorter/controller/SlsClipboard.cxx | 2 +-
.../controller/SlsCurrentSlideManager.cxx | 12 ++--
.../ui/slidesorter/controller/SlsFocusManager.cxx | 4 +-
.../ui/slidesorter/controller/SlsPageSelector.cxx | 12 ++--
.../controller/SlsSelectionFunction.cxx | 8 +--
.../slidesorter/controller/SlsSelectionManager.cxx | 2 +-
.../ui/slidesorter/controller/SlsSlotManager.cxx | 4 +-
.../ui/slidesorter/model/SlideSorterModel.cxx | 4 +-
.../ui/slidesorter/model/SlsPageEnumeration.cxx | 2 +-
sd/source/ui/slidesorter/shell/SlideSorter.cxx | 8 +--
.../ui/slidesorter/shell/SlideSorterViewShell.cxx | 50 +++++++-------
sd/source/ui/slidesorter/view/SlideSorterView.cxx | 4 +-
.../ui/slidesorter/view/SlsViewCacheContext.cxx | 2 +-
sd/source/ui/view/FormShellManager.cxx | 2 +-
sd/source/ui/view/ViewShellBase.cxx | 2 +-
sd/source/ui/view/ViewShellManager.cxx | 4 +-
sd/source/ui/view/drviews1.cxx | 4 +-
sd/source/ui/view/drviews4.cxx | 14 ++--
sd/source/ui/view/grviewsh.cxx | 2 +-
sd/source/ui/view/viewshe2.cxx | 34 +++++-----
sd/source/ui/view/viewshel.cxx | 76 +++++++++++-----------
sdext/source/presenter/PresenterAccessibility.cxx | 2 +-
sdext/source/presenter/PresenterButton.cxx | 10 +--
sdext/source/presenter/PresenterController.cxx | 8 +--
sdext/source/presenter/PresenterHelpView.cxx | 4 +-
sdext/source/presenter/PresenterNotesView.cxx | 10 +--
sdext/source/presenter/PresenterPaneBase.cxx | 4 +-
.../presenter/PresenterPaneBorderPainter.cxx | 6 +-
sdext/source/presenter/PresenterPaneContainer.cxx | 16 ++---
sdext/source/presenter/PresenterPaneFactory.cxx | 4 +-
.../source/presenter/PresenterProtocolHandler.cxx | 2 +-
sdext/source/presenter/PresenterScreen.cxx | 4 +-
sdext/source/presenter/PresenterScrollBar.cxx | 6 +-
sdext/source/presenter/PresenterSlidePreview.cxx | 2 +-
sdext/source/presenter/PresenterSlideShowView.cxx | 10 +--
sdext/source/presenter/PresenterSlideSorter.cxx | 56 ++++++++--------
sdext/source/presenter/PresenterTheme.cxx | 28 ++++----
sdext/source/presenter/PresenterTimer.cxx | 2 +-
sdext/source/presenter/PresenterToolBar.cxx | 37 +++++------
sdext/source/presenter/PresenterViewFactory.cxx | 4 +-
sdext/source/presenter/PresenterWindowManager.cxx | 20 +++---
sfx2/source/sidebar/SidebarController.cxx | 4 +-
sfx2/source/view/viewprn.cxx | 2 +-
slideshow/source/engine/effectrewinder.cxx | 2 +-
slideshow/source/engine/eventqueue.cxx | 6 +-
store/source/storbase.hxx | 4 +-
svl/source/items/style.cxx | 2 +-
svtools/source/brwbox/brwbox2.cxx | 4 +-
svtools/source/control/tabbar.cxx | 2 +-
sw/source/filter/ww8/WW8TableInfo.cxx | 14 ++--
sw/source/filter/ww8/wrtw8nds.cxx | 6 +-
sw/source/filter/ww8/wrtww8.cxx | 10 +--
sw/source/filter/ww8/ww8atr.cxx | 2 +-
vcl/qa/cppunit/lifecycle.cxx | 6 +-
vcl/source/control/tabctrl.cxx | 2 +-
vcl/unx/gtk3/a11y/gtk3atkwrapper.cxx | 6 +-
writerfilter/source/dmapper/DomainMapper.cxx | 14 ++--
.../source/dmapper/DomainMapperTableHandler.cxx | 2 +-
.../source/dmapper/DomainMapperTableManager.cxx | 4 +-
writerfilter/source/dmapper/DomainMapper_Impl.cxx | 2 +-
writerfilter/source/dmapper/GraphicImport.cxx | 2 +-
writerfilter/source/dmapper/StyleSheetTable.cxx | 2 +-
.../source/dmapper/TablePropertiesHandler.cxx | 2 +-
writerfilter/source/ooxml/Handler.cxx | 4 +-
writerfilter/source/ooxml/OOXMLFactory.cxx | 6 +-
.../source/ooxml/OOXMLFastContextHandler.cxx | 10 +--
writerfilter/source/ooxml/OOXMLParserState.cxx | 8 +--
writerfilter/source/ooxml/OOXMLPropertySet.cxx | 16 ++---
113 files changed, 466 insertions(+), 405 deletions(-)

Upstream: cgit.freedesktop.org


  • Share