Commit 9022c329 by luyikei

SequenceWorkflow: Use unique_ptr for m_multitrack

parent 1b9b2e13
......@@ -60,7 +60,6 @@ SequenceWorkflow::SequenceWorkflow( size_t trackCount )
SequenceWorkflow::~SequenceWorkflow()
{
delete m_multitrack;
clear();
}
......@@ -277,7 +276,7 @@ SequenceWorkflow::loadFromVariant( const QVariant& variant )
EffectHelper::loadFromVariant( m["filters"], clip->input() );
}
EffectHelper::loadFromVariant( variant.toMap()["filters"], m_multitrack );
EffectHelper::loadFromVariant( variant.toMap()["filters"], m_multitrack.get() );
}
void
......@@ -317,7 +316,7 @@ SequenceWorkflow::position( const QUuid& uuid )
Backend::IInput*
SequenceWorkflow::input()
{
return m_multitrack;
return m_multitrack.get();
}
Backend::IInput*
......
......@@ -119,9 +119,9 @@ class SequenceWorkflow : public QObject
QMap<QUuid, QSharedPointer<ClipInstance>> m_clips;
Backend::IMultiTrack* m_multitrack;
QList<QSharedPointer<Track>> m_tracks[Workflow::NbTrackType];
QList<std::shared_ptr<Backend::IMultiTrack>> m_multiTracks;
std::unique_ptr<Backend::IMultiTrack> m_multitrack;
const size_t m_trackCount;
signals:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment