summaryrefslogtreecommitdiff
path: root/slideshow
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2020-06-02 10:40:26 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2020-06-03 10:51:57 +0200
commit054c0e7177cbef26942f8ca7cb7b1422ceea721c (patch)
tree7390a1be5ee0797b7f43d7d433822315fd75c6dd /slideshow
parent0f499af8c2c22ccc8f1c19edeeb2bdac8cbcb7f0 (diff)
loplugin:simplifypointertobool improve
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 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'slideshow')
-rw-r--r--slideshow/source/engine/effectrewinder.cxx2
-rw-r--r--slideshow/source/engine/eventqueue.cxx6
2 files changed, 3 insertions, 5 deletions
diff --git a/slideshow/source/engine/effectrewinder.cxx b/slideshow/source/engine/effectrewinder.cxx
index 8319856c1154..5a784a7fe7d0 100644
--- a/slideshow/source/engine/effectrewinder.cxx
+++ b/slideshow/source/engine/effectrewinder.cxx
@@ -207,7 +207,7 @@ bool EffectRewinder::rewind (
if (mpAsynchronousRewindEvent)
mrEventQueue.addEvent(mpAsynchronousRewindEvent);
- return mpAsynchronousRewindEvent.get()!=nullptr;
+ return bool(mpAsynchronousRewindEvent);
}
diff --git a/slideshow/source/engine/eventqueue.cxx b/slideshow/source/engine/eventqueue.cxx
index 5ed44f0efd44..6094fa43bf89 100644
--- a/slideshow/source/engine/eventqueue.cxx
+++ b/slideshow/source/engine/eventqueue.cxx
@@ -111,7 +111,7 @@ namespace slideshow::internal
<< " with delay " << rEvent->getActivationTime(0.0)
);
- ENSURE_OR_RETURN_FALSE( rEvent.get() != nullptr,
+ ENSURE_OR_RETURN_FALSE( rEvent,
"EventQueue::addEvent: event ptr NULL" );
maNextEvents.emplace_back( rEvent, rEvent->getActivationTime(
mpTimer->getElapsedTime()) );
@@ -128,9 +128,7 @@ namespace slideshow::internal
<< " with delay " << rpEvent->getActivationTime(0.0)
);
- ENSURE_OR_RETURN_FALSE(
- rpEvent.get() != nullptr,
- "EventQueue::addEvent: event ptr NULL");
+ ENSURE_OR_RETURN_FALSE( rpEvent, "EventQueue::addEvent: event ptr NULL");
maNextNextEvents.push(
EventEntry(