[vlmc-devel] Remove usage of smart_ptr.get() == nullptr
Yikai Lu
git at videolan.org
Wed Jun 29 10:09:33 CEST 2016
vlmc | branch: master | Yikai Lu <luyikei.qmltu at gmail.com> | Wed Jun 29 16:59:23 2016 +0900| [2836dbb26566f1d7e15a1dfb3a4a2a8fdc27db3e] | committer: Yikai Lu
Remove usage of smart_ptr.get() == nullptr
> https://code.videolan.org/videolan/vlmc/commit/2836dbb26566f1d7e15a1dfb3a4a2a8fdc27db3e
---
src/Backend/MLT/MLTFilter.cpp | 4 ++--
src/Gui/timeline/GraphicsEffectItem.cpp | 2 +-
src/Renderer/AbstractRenderer.cpp | 2 +-
3 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/Backend/MLT/MLTFilter.cpp b/src/Backend/MLT/MLTFilter.cpp
index f889ef4..4c5b3bd 100644
--- a/src/Backend/MLT/MLTFilter.cpp
+++ b/src/Backend/MLT/MLTFilter.cpp
@@ -223,7 +223,7 @@ MLTFilter::length() const
{
auto length = m_filter->get_length();
- if ( length == 0 && m_connectedProducer != nullptr )
+ if ( length == 0 && m_connectedProducer )
length = m_connectedProducer->get_playtime();
return length ? length : MLTInput::Unlimited;
@@ -232,7 +232,7 @@ MLTFilter::length() const
void
MLTFilter::detach()
{
- if ( m_connectedProducer.get() == nullptr )
+ if ( !m_connectedProducer )
return;
m_connectedProducer->detach( *m_filter );
m_connectedProducer.reset( nullptr );
diff --git a/src/Gui/timeline/GraphicsEffectItem.cpp b/src/Gui/timeline/GraphicsEffectItem.cpp
index e768e40..bfccbfd 100644
--- a/src/Gui/timeline/GraphicsEffectItem.cpp
+++ b/src/Gui/timeline/GraphicsEffectItem.cpp
@@ -269,7 +269,7 @@ GraphicsEffectItem::triggerResize( TrackWorkflow* target,
qint64 newBegin, qint64 newEnd, qint64 )
{
Q_UNUSED( target )
- if ( m_effectHelper.get() == nullptr )
+ if ( !m_effectHelper )
return ;
Commands::trigger( new Commands::Effect::Resize( m_effectHelper, newBegin, newEnd ) );
}
diff --git a/src/Renderer/AbstractRenderer.cpp b/src/Renderer/AbstractRenderer.cpp
index b9ef03e..a0105b9 100644
--- a/src/Renderer/AbstractRenderer.cpp
+++ b/src/Renderer/AbstractRenderer.cpp
@@ -69,7 +69,7 @@ AbstractRenderer::setPosition( qint64 pos )
void
AbstractRenderer::togglePlayPause()
{
- if ( m_input == nullptr || m_output.get() == nullptr )
+ if ( m_input == nullptr || !m_output )
return;
if ( m_output->isStopped() )
More information about the Vlmc-devel
mailing list