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
Nov 26, 2017
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()
if
(
songs
.
empty
())
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
();
return
result
;
}
src/playlist/cue/CueParser.cxx
View file @
2a774a1f
...
...
@@ -229,7 +229,7 @@ CueParser::Feed2(char *p) noexcept
}
state
=
TRACK
;
current
.
reset
(
new
DetachedSong
(
filename
)
);
current
=
std
::
make_unique
<
DetachedSong
>
(
filename
);
assert
(
!
current
->
GetTag
().
IsDefined
());
song_tag
=
header_tag
;
...
...
src/playlist/plugins/ExtM3uPlaylistPlugin.cxx
View file @
2a774a1f
...
...
@@ -135,7 +135,7 @@ ExtM3uPlaylist::NextSong()
line_s
=
StripLeft
(
line_s
);
}
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
[]
=
{
...
...
src/playlist/plugins/FlacPlaylistPlugin.cxx
View file @
2a774a1f
...
...
@@ -80,7 +80,7 @@ FlacPlaylist::NextSong()
?
c
.
tracks
[
next_track
].
offset
:
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
->
SetEndTime
(
SongTime
::
FromScale
(
end
,
sample_rate
));
return
song
;
...
...
src/playlist/plugins/M3uPlaylistPlugin.cxx
View file @
2a774a1f
...
...
@@ -55,7 +55,7 @@ M3uPlaylist::NextSong()
line_s
=
Strip
(
line_s
);
}
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
[]
=
{
...
...
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