Commit b82b5697 authored by Max Kellermann's avatar Max Kellermann

db/simple/Song: reorder fields for better packing

parent e4eb5b79
......@@ -29,13 +29,13 @@
#include "util/IterableSplitString.hxx"
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()),
start_time(other.GetStartTime()),
end_time(other.GetEndTime()),
audio_format(other.GetAudioFormat()),
filename(other.GetURI())
audio_format(other.GetAudioFormat())
{
}
......
......@@ -56,14 +56,28 @@ struct Song {
*/
Hook siblings;
Tag tag;
/**
* The #Directory that contains this song.
*/
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
* value means that this is unknown/unavailable.
*/
......@@ -87,20 +101,6 @@ struct Song {
*/
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>
Song(F &&_filename, Directory &_parent) noexcept
:parent(_parent), filename(std::forward<F>(_filename)) {}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment