db/simple: reorder fields to reduce padding
This commit is contained in:
parent
fec1a4ac32
commit
1a67062e1e
@ -42,11 +42,11 @@ static constexpr Domain simple_db_domain("simple_db");
|
||||
inline SimpleDatabase::SimpleDatabase(const ConfigBlock &block)
|
||||
:Database(simple_db_plugin),
|
||||
path(block.GetPath("path")),
|
||||
cache_path(block.GetPath("cache_directory")),
|
||||
#ifdef ENABLE_ZLIB
|
||||
compress(block.GetBlockValue("compress", true)),
|
||||
#endif
|
||||
hide_playlist_targets(block.GetBlockValue("hide_playlist_targets", true)),
|
||||
cache_path(block.GetPath("cache_directory"))
|
||||
hide_playlist_targets(block.GetBlockValue("hide_playlist_targets", true))
|
||||
{
|
||||
if (path.IsNull())
|
||||
throw std::runtime_error("No \"path\" parameter specified");
|
||||
@ -64,11 +64,11 @@ SimpleDatabase::SimpleDatabase(AllocatedPath &&_path,
|
||||
:Database(simple_db_plugin),
|
||||
path(std::move(_path)),
|
||||
path_utf8(path.ToUTF8()),
|
||||
cache_path(nullptr),
|
||||
#ifdef ENABLE_ZLIB
|
||||
compress(_compress),
|
||||
#endif
|
||||
hide_playlist_targets(_hide_playlist_targets),
|
||||
cache_path(nullptr)
|
||||
hide_playlist_targets(_hide_playlist_targets)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -24,12 +24,6 @@ class SimpleDatabase : public Database {
|
||||
AllocatedPath path;
|
||||
std::string path_utf8;
|
||||
|
||||
#ifdef ENABLE_ZLIB
|
||||
bool compress;
|
||||
#endif
|
||||
|
||||
bool hide_playlist_targets;
|
||||
|
||||
/**
|
||||
* The path where cache files for Mount() are located.
|
||||
*/
|
||||
@ -54,6 +48,12 @@ class SimpleDatabase : public Database {
|
||||
mutable unsigned borrowed_song_count;
|
||||
#endif
|
||||
|
||||
#ifdef ENABLE_ZLIB
|
||||
const bool compress;
|
||||
#endif
|
||||
|
||||
const bool hide_playlist_targets;
|
||||
|
||||
public:
|
||||
SimpleDatabase(const ConfigBlock &block);
|
||||
SimpleDatabase(AllocatedPath &&_path, bool _compress,
|
||||
|
Loading…
Reference in New Issue
Block a user