Skip to content
GitLab
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
34be1b01
Commit
34be1b01
authored
Mar 22, 2020
by
Jean-Baptiste Mardelle
Browse files
Fix compile warnings
parent
8a736c34
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/timeline2/model/timelinemodel.cpp
View file @
34be1b01
...
...
@@ -2739,8 +2739,8 @@ int TimelineModel::getNextSnapPos(int pos, std::vector<size_t> &snaps)
// sort snaps
std
::
sort
(
snaps
.
begin
(),
snaps
.
end
());
for
(
auto
i
:
snaps
)
{
if
(
i
>
pos
)
{
return
i
;
if
(
(
int
)
i
>
pos
)
{
return
(
int
)
i
;
}
}
return
pos
;
...
...
@@ -2774,8 +2774,8 @@ int TimelineModel::getPreviousSnapPos(int pos, std::vector<size_t> &snaps)
// sort descending
std
::
reverse
(
snaps
.
begin
(),
snaps
.
end
());
for
(
auto
i
:
snaps
)
{
if
(
i
<
pos
)
{
return
i
;
if
(
(
int
)
i
<
pos
)
{
return
(
int
)
i
;
}
}
return
0
;
...
...
src/timeline2/view/timelinecontroller.cpp
View file @
34be1b01
...
...
@@ -686,8 +686,8 @@ void TimelineController::gotoNextSnap()
m_snapStackIndex
=
pCore
->
undoIndex
();
m_activeSnaps
.
clear
();
m_activeSnaps
=
pCore
->
projectManager
()
->
current
()
->
getGuideModel
()
->
getSnapPoints
();
m_activeSnaps
.
push_back
(
m_zone
.
x
());
m_activeSnaps
.
push_back
(
m_zone
.
y
()
-
1
);
m_activeSnaps
.
push_back
(
(
size_t
)
m_zone
.
x
());
m_activeSnaps
.
push_back
(
(
size_t
)(
m_zone
.
y
()
-
1
)
)
;
}
int
nextSnap
=
m_model
->
getNextSnapPos
(
pCore
->
getTimelinePosition
(),
m_activeSnaps
);
if
(
nextSnap
>
pCore
->
getTimelinePosition
())
{
...
...
@@ -702,8 +702,8 @@ void TimelineController::gotoPreviousSnap()
m_snapStackIndex
=
pCore
->
undoIndex
();
m_activeSnaps
.
clear
();
m_activeSnaps
=
pCore
->
projectManager
()
->
current
()
->
getGuideModel
()
->
getSnapPoints
();
m_activeSnaps
.
push_back
(
m_zone
.
x
());
m_activeSnaps
.
push_back
(
m_zone
.
y
()
-
1
);
m_activeSnaps
.
push_back
(
(
size_t
)
m_zone
.
x
());
m_activeSnaps
.
push_back
(
(
size_t
)(
m_zone
.
y
()
-
1
)
)
;
}
setPosition
(
m_model
->
getPreviousSnapPos
(
pCore
->
getTimelinePosition
(),
m_activeSnaps
));
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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