Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Multimedia
Kdenlive
Commits
83c0ded8
Commit
83c0ded8
authored
Mar 20, 2021
by
Vincent Pinon
Browse files
clang-tidy -fix: modernize-use-emplace
parent
40a41665
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/timeline2/model/timelinemodel.cpp
View file @
83c0ded8
...
...
@@ -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
));
}
}
...
...
src/timeline2/view/timelinecontroller.cpp
View file @
83c0ded8
...
...
@@ -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
;
});
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment