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
497d0908
Commit
497d0908
authored
Sep 04, 2019
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
db/simple/Song: remove static method NewFile()
parent
6a138472
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
2 additions
and
12 deletions
+2
-12
SongUpdate.cxx
src/SongUpdate.cxx
+2
-3
Song.cxx
src/db/plugins/simple/Song.cxx
+0
-6
Song.hxx
src/db/plugins/simple/Song.hxx
+0
-3
No files found.
src/SongUpdate.cxx
View file @
497d0908
...
...
@@ -45,7 +45,7 @@ Song::LoadFile(Storage &storage, const char *path_utf8, Directory &parent)
assert
(
!
uri_has_scheme
(
path_utf8
));
assert
(
strchr
(
path_utf8
,
'\n'
)
==
nullptr
);
auto
song
=
NewFile
(
path_utf8
,
parent
);
auto
song
=
std
::
make_unique
<
Song
>
(
path_utf8
,
parent
);
if
(
!
song
->
UpdateFile
(
storage
))
return
nullptr
;
...
...
@@ -98,8 +98,7 @@ Song::LoadFromArchive(ArchiveFile &archive, const char *name_utf8,
assert
(
!
uri_has_scheme
(
name_utf8
));
assert
(
strchr
(
name_utf8
,
'\n'
)
==
nullptr
);
auto
song
=
NewFile
(
name_utf8
,
parent
);
auto
song
=
std
::
make_unique
<
Song
>
(
name_utf8
,
parent
);
if
(
!
song
->
UpdateFileInArchive
(
archive
))
return
nullptr
;
...
...
src/db/plugins/simple/Song.cxx
View file @
497d0908
...
...
@@ -48,12 +48,6 @@ Song::NewFrom(DetachedSong &&other, Directory &parent) noexcept
return
song
;
}
SongPtr
Song
::
NewFile
(
const
char
*
path
,
Directory
&
parent
)
noexcept
{
return
SongPtr
(
song_alloc
(
path
,
parent
));
}
std
::
string
Song
::
GetURI
()
const
noexcept
{
...
...
src/db/plugins/simple/Song.hxx
View file @
497d0908
...
...
@@ -101,9 +101,6 @@ struct Song {
static
SongPtr
NewFrom
(
DetachedSong
&&
other
,
Directory
&
parent
)
noexcept
;
/** allocate a new song with a local file name */
static
SongPtr
NewFile
(
const
char
*
path_utf8
,
Directory
&
parent
)
noexcept
;
/**
* allocate a new song structure with a local file name and attempt to
* load its metadata. If all decoder plugin fail to read its meta
...
...
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