Commit d38248f6 authored by Hugo Beauzée-Luyssen's avatar Hugo Beauzée-Luyssen

parser: IItem: Force Track to be moved into the items

parent 6558b2a6
Pipeline #4062 passed with stages
in 16 minutes and 17 seconds
...@@ -165,7 +165,7 @@ public: ...@@ -165,7 +165,7 @@ public:
* @brief addTrack Add a track to this item. * @brief addTrack Add a track to this item.
* @param t The track to add. * @param t The track to add.
*/ */
virtual void addTrack( Track t ) = 0; virtual void addTrack( Track&& t ) = 0;
/** /**
* @brief media Returns the media associated with this item, if any. * @brief media Returns the media associated with this item, if any.
......
...@@ -268,7 +268,7 @@ const std::vector<Task::Item::Track>& Task::Item::tracks() const ...@@ -268,7 +268,7 @@ const std::vector<Task::Item::Track>& Task::Item::tracks() const
return m_tracks; return m_tracks;
} }
void Task::Item::addTrack(Task::Item::Track t) void Task::Item::addTrack( Task::Item::Track&& t )
{ {
m_tracks.emplace_back( std::move( t ) ); m_tracks.emplace_back( std::move( t ) );
} }
......
...@@ -116,7 +116,7 @@ public: ...@@ -116,7 +116,7 @@ public:
virtual void setDuration( int64_t duration ) override; virtual void setDuration( int64_t duration ) override;
virtual const std::vector<Track>& tracks() const override; virtual const std::vector<Track>& tracks() const override;
virtual void addTrack( Track t ) override; virtual void addTrack( Track&& t ) override;
virtual MediaPtr media() override; virtual MediaPtr media() override;
virtual void setMedia( MediaPtr media ) override; virtual void setMedia( MediaPtr media ) override;
......
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