diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2020-05-28 08:26:51 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2020-05-28 09:48:09 +0200 |
commit | e84d05483cc5f30161dc5b15f93fb3bf71ed636e (patch) | |
tree | 2a343319cb4c1e06060b632de4fc840ba96bb70f /canvas/source/vcl | |
parent | 412ff42bf0a6d078b9a6fd1daa8d0eb0b9a78c4a (diff) |
Make loplugin:simplifypointertobool handle parenthesized expressions
...as discussed as an open TODO in the commit message of
fe6cce01c88d045a1fcf09acf049c34c22299b02 "Fix loplugin:simplifypointertobool for
libstdc++ std::shared_ptr". The necessary changes across the code base have
been done fully automatically with the rewriting plugin on Linux. (All those
changes apparently involve uses of macro arguments wrapped in parentheses in the
macro body, but always in conditionally-converted-to-bool contexts. In other
contexts, such automatic rewriting would add the "bool" to the macro body, which
would be wrong in general, but we apparently get away with that sloppy coding
for now.)
The parenExprs_ stack that fe6cce01c88d045a1fcf09acf049c34c22299b02 had
introduced to treat such (then-undetected, it had turned out) parenthesized
cases now turns out to not be needed after all.
Change-Id: I2021f61c2e2805be7e18b38edf8744d186cac3cb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95010
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'canvas/source/vcl')
-rw-r--r-- | canvas/source/vcl/canvashelper.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/canvas/source/vcl/canvashelper.cxx b/canvas/source/vcl/canvashelper.cxx index 07dc45574e64..981a442a2e6c 100644 --- a/canvas/source/vcl/canvashelper.cxx +++ b/canvas/source/vcl/canvashelper.cxx @@ -994,7 +994,7 @@ namespace vclcanvas const rendering::RenderState& renderState, ColorType eColorType ) const { - ENSURE_OR_THROW( mpOutDevProvider.get(), + ENSURE_OR_THROW( mpOutDevProvider, "outdev null. Are we disposed?" ); ::canvas::tools::verifyInput( renderState, @@ -1079,7 +1079,7 @@ namespace vclcanvas const rendering::RenderState& renderState, const uno::Reference< rendering::XCanvasFont >& xFont ) const { - ENSURE_OR_THROW( mpOutDevProvider.get(), + ENSURE_OR_THROW( mpOutDevProvider, "outdev null. Are we disposed?" ); OutputDevice& rOutDev( mpOutDevProvider->getOutDev() ); |