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
2a774a1f
Commit
2a774a1f
authored
7 years ago
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
playlist/{flac,m3u}: use std::make_unique
parent
b13b023c
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
5 additions
and
5 deletions
+5
-5
MemorySongEnumerator.cxx
src/playlist/MemorySongEnumerator.cxx
+1
-1
CueParser.cxx
src/playlist/cue/CueParser.cxx
+1
-1
ExtM3uPlaylistPlugin.cxx
src/playlist/plugins/ExtM3uPlaylistPlugin.cxx
+1
-1
FlacPlaylistPlugin.cxx
src/playlist/plugins/FlacPlaylistPlugin.cxx
+1
-1
M3uPlaylistPlugin.cxx
src/playlist/plugins/M3uPlaylistPlugin.cxx
+1
-1
No files found.
src/playlist/MemorySongEnumerator.cxx
View file @
2a774a1f
...
@@ -26,7 +26,7 @@ MemorySongEnumerator::NextSong()
...
@@ -26,7 +26,7 @@ MemorySongEnumerator::NextSong()
if
(
songs
.
empty
())
if
(
songs
.
empty
())
return
nullptr
;
return
nullptr
;
std
::
unique_ptr
<
DetachedSong
>
result
(
new
DetachedSong
(
std
::
move
(
songs
.
front
()
)));
auto
result
=
std
::
make_unique
<
DetachedSong
>
(
std
::
move
(
songs
.
front
(
)));
songs
.
pop_front
();
songs
.
pop_front
();
return
result
;
return
result
;
}
}
This diff is collapsed.
Click to expand it.
src/playlist/cue/CueParser.cxx
View file @
2a774a1f
...
@@ -229,7 +229,7 @@ CueParser::Feed2(char *p) noexcept
...
@@ -229,7 +229,7 @@ CueParser::Feed2(char *p) noexcept
}
}
state
=
TRACK
;
state
=
TRACK
;
current
.
reset
(
new
DetachedSong
(
filename
)
);
current
=
std
::
make_unique
<
DetachedSong
>
(
filename
);
assert
(
!
current
->
GetTag
().
IsDefined
());
assert
(
!
current
->
GetTag
().
IsDefined
());
song_tag
=
header_tag
;
song_tag
=
header_tag
;
...
...
This diff is collapsed.
Click to expand it.
src/playlist/plugins/ExtM3uPlaylistPlugin.cxx
View file @
2a774a1f
...
@@ -135,7 +135,7 @@ ExtM3uPlaylist::NextSong()
...
@@ -135,7 +135,7 @@ ExtM3uPlaylist::NextSong()
line_s
=
StripLeft
(
line_s
);
line_s
=
StripLeft
(
line_s
);
}
while
(
line_s
[
0
]
==
'#'
||
*
line_s
==
0
);
}
while
(
line_s
[
0
]
==
'#'
||
*
line_s
==
0
);
return
std
::
unique_ptr
<
DetachedSong
>
(
new
DetachedSong
(
line_s
,
std
::
move
(
tag
)
));
return
std
::
make_unique
<
DetachedSong
>
(
line_s
,
std
::
move
(
tag
));
}
}
static
const
char
*
const
extm3u_suffixes
[]
=
{
static
const
char
*
const
extm3u_suffixes
[]
=
{
...
...
This diff is collapsed.
Click to expand it.
src/playlist/plugins/FlacPlaylistPlugin.cxx
View file @
2a774a1f
...
@@ -80,7 +80,7 @@ FlacPlaylist::NextSong()
...
@@ -80,7 +80,7 @@ FlacPlaylist::NextSong()
?
c
.
tracks
[
next_track
].
offset
?
c
.
tracks
[
next_track
].
offset
:
total_samples
;
:
total_samples
;
std
::
unique_ptr
<
DetachedSong
>
song
(
new
DetachedSong
(
uri
)
);
auto
song
=
std
::
make_unique
<
DetachedSong
>
(
uri
);
song
->
SetStartTime
(
SongTime
::
FromScale
(
start
,
sample_rate
));
song
->
SetStartTime
(
SongTime
::
FromScale
(
start
,
sample_rate
));
song
->
SetEndTime
(
SongTime
::
FromScale
(
end
,
sample_rate
));
song
->
SetEndTime
(
SongTime
::
FromScale
(
end
,
sample_rate
));
return
song
;
return
song
;
...
...
This diff is collapsed.
Click to expand it.
src/playlist/plugins/M3uPlaylistPlugin.cxx
View file @
2a774a1f
...
@@ -55,7 +55,7 @@ M3uPlaylist::NextSong()
...
@@ -55,7 +55,7 @@ M3uPlaylist::NextSong()
line_s
=
Strip
(
line_s
);
line_s
=
Strip
(
line_s
);
}
while
(
line_s
[
0
]
==
'#'
||
*
line_s
==
0
);
}
while
(
line_s
[
0
]
==
'#'
||
*
line_s
==
0
);
return
std
::
unique_ptr
<
DetachedSong
>
(
new
DetachedSong
(
line_s
)
);
return
std
::
make_unique
<
DetachedSong
>
(
line_s
);
}
}
static
const
char
*
const
m3u_suffixes
[]
=
{
static
const
char
*
const
m3u_suffixes
[]
=
{
...
...
This diff is collapsed.
Click to expand it.
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