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
b82b5697
Commit
b82b5697
authored
Oct 14, 2021
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
db/simple/Song: reorder fields for better packing
parent
e4eb5b79
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
20 deletions
+20
-20
Song.cxx
src/db/plugins/simple/Song.cxx
+4
-4
Song.hxx
src/db/plugins/simple/Song.hxx
+16
-16
No files found.
src/db/plugins/simple/Song.cxx
View file @
b82b5697
...
@@ -29,13 +29,13 @@
...
@@ -29,13 +29,13 @@
#include "util/IterableSplitString.hxx"
#include "util/IterableSplitString.hxx"
Song
::
Song
(
DetachedSong
&&
other
,
Directory
&
_parent
)
noexcept
Song
::
Song
(
DetachedSong
&&
other
,
Directory
&
_parent
)
noexcept
:
tag
(
std
::
move
(
other
.
WritableTag
())),
:
parent
(
_parent
),
parent
(
_parent
),
filename
(
other
.
GetURI
()),
tag
(
std
::
move
(
other
.
WritableTag
())),
mtime
(
other
.
GetLastModified
()),
mtime
(
other
.
GetLastModified
()),
start_time
(
other
.
GetStartTime
()),
start_time
(
other
.
GetStartTime
()),
end_time
(
other
.
GetEndTime
()),
end_time
(
other
.
GetEndTime
()),
audio_format
(
other
.
GetAudioFormat
()),
audio_format
(
other
.
GetAudioFormat
())
filename
(
other
.
GetURI
())
{
{
}
}
...
...
src/db/plugins/simple/Song.hxx
View file @
b82b5697
...
@@ -56,14 +56,28 @@ struct Song {
...
@@ -56,14 +56,28 @@ struct Song {
*/
*/
Hook
siblings
;
Hook
siblings
;
Tag
tag
;
/**
/**
* The #Directory that contains this song.
* The #Directory that contains this song.
*/
*/
Directory
&
parent
;
Directory
&
parent
;
/**
/**
* The file name.
*/
std
::
string
filename
;
/**
* If non-empty, then this object does not describe a file
* within the `music_directory`, but some sort of symbolic
* link pointing to this value. It can be an absolute URI
* (i.e. with URI scheme) or a URI relative to this object
* (which may begin with one or more "../").
*/
std
::
string
target
;
Tag
tag
;
/**
* The time stamp of the last file modification. A negative
* The time stamp of the last file modification. A negative
* value means that this is unknown/unavailable.
* value means that this is unknown/unavailable.
*/
*/
...
@@ -87,20 +101,6 @@ struct Song {
...
@@ -87,20 +101,6 @@ struct Song {
*/
*/
AudioFormat
audio_format
=
AudioFormat
::
Undefined
();
AudioFormat
audio_format
=
AudioFormat
::
Undefined
();
/**
* The file name.
*/
std
::
string
filename
;
/**
* If non-empty, then this object does not describe a file
* within the `music_directory`, but some sort of symbolic
* link pointing to this value. It can be an absolute URI
* (i.e. with URI scheme) or a URI relative to this object
* (which may begin with one or more "../").
*/
std
::
string
target
;
template
<
typename
F
>
template
<
typename
F
>
Song
(
F
&&
_filename
,
Directory
&
_parent
)
noexcept
Song
(
F
&&
_filename
,
Directory
&
_parent
)
noexcept
:
parent
(
_parent
),
filename
(
std
::
forward
<
F
>
(
_filename
))
{}
:
parent
(
_parent
),
filename
(
std
::
forward
<
F
>
(
_filename
))
{}
...
...
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