Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mpd
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Иван Мажукин
mpd
Commits
81b73736
Commit
81b73736
authored
Oct 18, 2017
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
queue/Queue: MoveOrder() returns to_order
parent
fa67c254
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
4 deletions
+6
-4
Playlist.cxx
src/queue/Playlist.cxx
+1
-2
Queue.cxx
src/queue/Queue.cxx
+2
-1
Queue.hxx
src/queue/Queue.hxx
+3
-1
No files found.
src/queue/Playlist.cxx
View file @
81b73736
...
...
@@ -310,8 +310,7 @@ playlist::SetRandom(PlayerControl &pc, bool status)
playlist is played after that */
unsigned
current_order
=
queue
.
PositionToOrder
(
current_position
);
queue
.
MoveOrder
(
current_order
,
0
);
current
=
0
;
current
=
queue
.
MoveOrder
(
current_order
,
0
);
}
else
current
=
-
1
;
}
else
...
...
src/queue/Queue.cxx
View file @
81b73736
...
...
@@ -195,7 +195,7 @@ Queue::MoveRange(unsigned start, unsigned end, unsigned to) noexcept
}
}
voi
d
unsigne
d
Queue
::
MoveOrder
(
unsigned
from_order
,
unsigned
to_order
)
noexcept
{
assert
(
from_order
<
length
);
...
...
@@ -212,6 +212,7 @@ Queue::MoveOrder(unsigned from_order, unsigned to_order) noexcept
}
order
[
to_order
]
=
from_position
;
return
to_order
;
}
void
...
...
src/queue/Queue.hxx
View file @
81b73736
...
...
@@ -284,8 +284,10 @@ struct Queue {
/**
* Moves a song to a new position in the "order" list.
*
* @return to_order
*/
voi
d
MoveOrder
(
unsigned
from_order
,
unsigned
to_order
)
noexcept
;
unsigne
d
MoveOrder
(
unsigned
from_order
,
unsigned
to_order
)
noexcept
;
/**
* Moves a song to a new position.
...
...
Write
Preview
Markdown
is supported
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