Commit 83c0ded8 authored by Vincent Pinon's avatar Vincent Pinon
Browse files

clang-tidy -fix: modernize-use-emplace

parent 40a41665
......@@ -2128,7 +2128,7 @@ bool TimelineModel::requestGroupMove(int itemId, int groupId, int delta_track, i
}
}
if (isClip(affectedItemId)) {
sorted_clips.push_back({affectedItemId, m_allClips[affectedItemId]->getPosition()});
sorted_clips.emplace_back(affectedItemId, m_allClips[affectedItemId]->getPosition());
sorted_clips_ids.push_back(affectedItemId);
int current_track_id = getClipTrackId(affectedItemId);
// Check if we have a mix in the group
......@@ -2151,7 +2151,7 @@ bool TimelineModel::requestGroupMove(int itemId, int groupId, int delta_track, i
} else if (isComposition(affectedItemId)) {
sorted_compositions.push_back({affectedItemId, {m_allCompositions[affectedItemId]->getPosition(), getTrackMltIndex(m_allCompositions[affectedItemId]->getCurrentTrackId())}});
} else if (isSubTitle(affectedItemId)) {
sorted_subtitles.push_back({affectedItemId, m_allSubtitles.at(affectedItemId)});
sorted_subtitles.emplace_back(affectedItemId, m_allSubtitles.at(affectedItemId));
}
}
......
......@@ -280,7 +280,7 @@ int TimelineController::selectedTrack() const
std::vector<std::pair<int, int>> selected_tracks; // contains pairs of (track position, track id) for each selected item
for (int s : sel) {
int tid = m_model->getItemTrackId(s);
selected_tracks.push_back({m_model->getTrackPosition(tid), tid});
selected_tracks.emplace_back(m_model->getTrackPosition(tid), tid);
}
// sort by track position
std::sort(selected_tracks.begin(), selected_tracks.begin(), [](const auto &a, const auto &b) { return a.first < b.first; });
......
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