[vlmc-devel] [PATCH] SequenceWorkflow: shorten clear() function

Hugo Beauzée-Luyssen hugo at beauzee.fr
Fri Apr 7 16:59:34 CEST 2017


On Fri, Apr 7, 2017, at 08:58 AM, Hieu Pham wrote:
> ---
>  src/Workflow/SequenceWorkflow.cpp | 10 ++--------
>  1 file changed, 2 insertions(+), 8 deletions(-)
> 
> diff --git a/src/Workflow/SequenceWorkflow.cpp
> b/src/Workflow/SequenceWorkflow.cpp
> index 8b332bf..c669162 100644
> --- a/src/Workflow/SequenceWorkflow.cpp
> +++ b/src/Workflow/SequenceWorkflow.cpp
> @@ -263,7 +263,6 @@ SequenceWorkflow::loadFromVariant( const QVariant&
> variant )
>  
>          auto uuid = m["uuid"].toUuid();
>          auto isAudio = m["isAudio"].toBool();
> -        //FIXME: Add missing clip type handling. We don't know if we're
> adding an audio clip or not
>          addClip( clip, m["trackId"].toUInt(),
>          m["position"].toLongLong(), uuid, isAudio );
>          auto c = m_clips[uuid];
>  
> @@ -283,13 +282,8 @@ SequenceWorkflow::loadFromVariant( const QVariant&
> variant )
>  void
>  SequenceWorkflow::clear()
>  {
> -    auto it = m_clips.begin();
> -    while ( it != m_clips.end() )
> -    {
> -        removeClip( it.key() );
> -        // m_clips.begin() can be changed
> -        it = m_clips.begin();
> -    }
> +    while ( !m_clips.empty() )
> +        removeClip( m_clips.begin().key() );
>  }
>  
>  QSharedPointer<SequenceWorkflow::ClipInstance>
> -- 
> 2.9.3
> 
> _______________________________________________
> Vlmc-devel mailing list
> Vlmc-devel at videolan.org
> https://mailman.videolan.org/listinfo/vlmc-devel

LGTM, but could you please split the comment removal in a separate
patch? It's not related to the actual changes, and should therefor be in
a different commit :)

Regards,

-- 
  Hugo Beauzée-Luyssen
  hugo at beauzee.fr


More information about the Vlmc-devel mailing list