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
602bb717
Commit
602bb717
authored
Nov 26, 2017
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Queue: use C++11 initializer
parent
75582d47
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
13 deletions
+8
-13
Queue.cxx
src/queue/Queue.cxx
+2
-7
Queue.hxx
src/queue/Queue.hxx
+6
-6
No files found.
src/queue/Queue.cxx
View file @
602bb717
...
@@ -22,15 +22,10 @@
...
@@ -22,15 +22,10 @@
#include "DetachedSong.hxx"
#include "DetachedSong.hxx"
Queue
::
Queue
(
unsigned
_max_length
)
Queue
::
Queue
(
unsigned
_max_length
)
:
max_length
(
_max_length
),
length
(
0
),
:
max_length
(
_max_length
),
version
(
1
),
items
(
new
Item
[
max_length
]),
items
(
new
Item
[
max_length
]),
order
(
new
unsigned
[
max_length
]),
order
(
new
unsigned
[
max_length
]),
id_table
(
max_length
*
HASH_MULT
),
id_table
(
max_length
*
HASH_MULT
)
repeat
(
false
),
single
(
false
),
consume
(
false
),
random
(
false
)
{
{
}
}
...
...
src/queue/Queue.hxx
View file @
602bb717
...
@@ -73,10 +73,10 @@ struct Queue {
...
@@ -73,10 +73,10 @@ struct Queue {
unsigned
max_length
;
unsigned
max_length
;
/** number of songs in the queue */
/** number of songs in the queue */
unsigned
length
;
unsigned
length
=
0
;
/** the current version number */
/** the current version number */
uint32_t
version
;
uint32_t
version
=
1
;
/** all songs in "position" order */
/** all songs in "position" order */
Item
*
items
;
Item
*
items
;
...
@@ -89,16 +89,16 @@ struct Queue {
...
@@ -89,16 +89,16 @@ struct Queue {
/** repeat playback when the end of the queue has been
/** repeat playback when the end of the queue has been
reached? */
reached? */
bool
repeat
;
bool
repeat
=
false
;
/** play only current song. */
/** play only current song. */
bool
single
;
bool
single
=
false
;
/** remove each played files. */
/** remove each played files. */
bool
consume
;
bool
consume
=
false
;
/** play back songs in random order? */
/** play back songs in random order? */
bool
random
;
bool
random
=
false
;
/** random number generator for shuffle and random mode */
/** random number generator for shuffle and random mode */
LazyRandomEngine
rand
;
LazyRandomEngine
rand
;
...
...
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