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
80cb680f
Commit
80cb680f
authored
Jul 06, 2018
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
db/LightSong: implicit initialization
parent
b9ff6383
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
18 deletions
+7
-18
LightSong.hxx
src/db/LightSong.hxx
+5
-5
ProxyDatabasePlugin.cxx
src/db/plugins/ProxyDatabasePlugin.cxx
+2
-7
UpnpDatabasePlugin.cxx
src/db/plugins/upnp/UpnpDatabasePlugin.cxx
+0
-6
No files found.
src/db/LightSong.hxx
View file @
80cb680f
...
...
@@ -42,7 +42,7 @@ struct LightSong {
* #uri. To build the full URI, join directory and uri with a
* slash.
*/
const
char
*
directory
;
const
char
*
directory
=
nullptr
;
const
char
*
uri
;
...
...
@@ -54,7 +54,7 @@ struct LightSong {
* This attribute is used for songs from the database which
* have a relative URI.
*/
const
char
*
real_uri
;
const
char
*
real_uri
=
nullptr
;
/**
* Metadata.
...
...
@@ -65,18 +65,18 @@ struct LightSong {
* The time stamp of the last file modification. A negative
* value means that this is unknown/unavailable.
*/
std
::
chrono
::
system_clock
::
time_point
mtime
;
std
::
chrono
::
system_clock
::
time_point
mtime
=
std
::
chrono
::
system_clock
::
time_point
::
min
()
;
/**
* Start of this sub-song within the file.
*/
SongTime
start_time
;
SongTime
start_time
=
SongTime
::
zero
()
;
/**
* End of this sub-song within the file.
* Unused if zero.
*/
SongTime
end_time
;
SongTime
end_time
=
SongTime
::
zero
()
;
explicit
LightSong
(
const
Tag
&
_tag
)
noexcept
:
tag
(
_tag
)
{}
...
...
src/db/plugins/ProxyDatabasePlugin.cxx
View file @
80cb680f
...
...
@@ -205,20 +205,15 @@ Copy(TagBuilder &tag, TagType d_tag,
ProxySong
::
ProxySong
(
const
mpd_song
*
song
)
:
LightSong
(
tag2
)
{
directory
=
nullptr
;
uri
=
mpd_song_get_uri
(
song
);
real_uri
=
nullptr
;
const
auto
_mtime
=
mpd_song_get_last_modified
(
song
);
mtime
=
_mtime
>
0
?
std
::
chrono
::
system_clock
::
from_time_t
(
_mtime
)
:
std
::
chrono
::
system_clock
::
time_point
::
min
();
if
(
_mtime
>
0
)
mtime
=
std
::
chrono
::
system_clock
::
from_time_t
(
_mtime
);
#if LIBMPDCLIENT_CHECK_VERSION(2,3,0)
start_time
=
SongTime
::
FromS
(
mpd_song_get_start
(
song
));
end_time
=
SongTime
::
FromS
(
mpd_song_get_end
(
song
));
#else
start_time
=
end_time
=
SongTime
::
zero
();
#endif
TagBuilder
tag_builder
;
...
...
src/db/plugins/upnp/UpnpDatabasePlugin.cxx
View file @
80cb680f
...
...
@@ -59,11 +59,8 @@ public:
uri2
(
std
::
move
(
_uri
)),
real_uri2
(
std
::
move
(
object
.
url
)),
tag2
(
std
::
move
(
object
.
tag
))
{
directory
=
nullptr
;
uri
=
uri2
.
c_str
();
real_uri
=
real_uri2
.
c_str
();
mtime
=
std
::
chrono
::
system_clock
::
time_point
::
min
();
start_time
=
end_time
=
SongTime
::
zero
();
}
};
...
...
@@ -322,11 +319,8 @@ visitSong(const UPnPDirObject &meta, const char *path,
return
;
LightSong
song
(
meta
.
tag
);
song
.
directory
=
nullptr
;
song
.
uri
=
path
;
song
.
real_uri
=
meta
.
url
.
c_str
();
song
.
mtime
=
std
::
chrono
::
system_clock
::
time_point
::
min
();
song
.
start_time
=
song
.
end_time
=
SongTime
::
zero
();
if
(
selection
.
Match
(
song
))
visit_song
(
song
);
...
...
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