From 9894967fcb26e25f7a63a37ef0cb5abeb5d2156a Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Sun, 2 Sep 2018 10:42:54 +0200 Subject: [PATCH] db/Selection: move `bool` attribute to the end May allow a better memory layout. --- src/db/Selection.cxx | 2 +- src/db/Selection.hxx | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/db/Selection.cxx b/src/db/Selection.cxx index 790e28021..abfc814a0 100644 --- a/src/db/Selection.cxx +++ b/src/db/Selection.cxx @@ -23,7 +23,7 @@ DatabaseSelection::DatabaseSelection(const char *_uri, bool _recursive, const SongFilter *_filter) noexcept - :uri(_uri), recursive(_recursive), filter(_filter) + :uri(_uri), filter(_filter), recursive(_recursive) { /* optimization: if the caller didn't specify a base URI, pick the one from SongFilter */ diff --git a/src/db/Selection.hxx b/src/db/Selection.hxx index 8356f3a83..7b4e3f5ca 100644 --- a/src/db/Selection.hxx +++ b/src/db/Selection.hxx @@ -34,13 +34,13 @@ struct DatabaseSelection { */ std::string uri; + const SongFilter *filter; + /** * Recursively search all sub directories? */ bool recursive; - const SongFilter *filter; - DatabaseSelection(const char *_uri, bool _recursive, const SongFilter *_filter=nullptr) noexcept;