[clang-tidy] pass by value where appropriate

Found with modernize-pass-by-value

Signed-off-by: Rosen Penev <rosenp@gmail.com>
This commit is contained in:
Rosen Penev
2020-01-31 19:59:48 -08:00
parent bc6eca2115
commit ecad6d936a
4 changed files with 12 additions and 8 deletions

View File

@@ -23,14 +23,15 @@
#include "song/Filter.hxx"
#include <algorithm>
#include <utility>
#include <assert.h>
#include <stdlib.h>
#include <string.h>
DatabaseVisitorHelper::DatabaseVisitorHelper(const DatabaseSelection &_selection,
DatabaseVisitorHelper::DatabaseVisitorHelper(DatabaseSelection _selection,
VisitSong &visit_song) noexcept
:selection(_selection)
:selection(std::move(_selection))
{
// TODO: apply URI and SongFilter
assert(selection.uri.empty());

View File

@@ -60,7 +60,7 @@ public:
* @param visit_song the callback function passed to
* Database::Visit(); may be replaced by this class
*/
DatabaseVisitorHelper(const DatabaseSelection &selection,
DatabaseVisitorHelper(DatabaseSelection selection,
VisitSong &visit_song) noexcept;
~DatabaseVisitorHelper() noexcept;