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

Hugo Beauzée-Luyssen hugo at beauzee.fr
Tue Apr 18 15:11:33 CEST 2017


On Sat, Apr 8, 2017, at 03:03 AM, Hieu Pham wrote:
> ---
>  src/Workflow/SequenceWorkflow.cpp | 9 ++-------
>  1 file changed, 2 insertions(+), 7 deletions(-)
> 
> diff --git a/src/Workflow/SequenceWorkflow.cpp
> b/src/Workflow/SequenceWorkflow.cpp
> index 8b332bf..f8f1bad 100644
> --- a/src/Workflow/SequenceWorkflow.cpp
> +++ b/src/Workflow/SequenceWorkflow.cpp
> @@ -283,13 +283,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

Applied.

Sorry about the time it took, and thanks for your patch!

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


More information about the Vlmc-devel mailing list