[vlmc-devel] SequenceWorkflow: shorten clear() function
Hieu Pham
git at videolan.org
Tue Apr 18 15:11:01 CEST 2017
vlmc | branch: master | Hieu Pham <phamhuuquanghieu at gmail.com> | Fri Apr 7 20:03:01 2017 -0500| [d9f740d86f518101d60794143c33015f4c0566d4] | committer: Hugo Beauzée-Luyssen
SequenceWorkflow: shorten clear() function
Signed-off-by: Hugo Beauzée-Luyssen <hugo at beauzee.fr>
> https://code.videolan.org/videolan/vlmc/commit/d9f740d86f518101d60794143c33015f4c0566d4
---
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>
More information about the Vlmc-devel
mailing list