[vlmc-devel] [PATCH] SequenceWorkflow: shorten clear() function
Hieu Pham
phamhuuquanghieu at gmail.com
Sat Apr 8 03:03:01 CEST 2017
---
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
More information about the Vlmc-devel
mailing list