Pass random_exlude_pattern as reference

This commit is contained in:
Andrzej Rybczak
2020-12-13 16:43:43 +01:00
parent 8575a9132c
commit 21034fdfa7
2 changed files with 2 additions and 2 deletions

View File

@@ -602,7 +602,7 @@ bool Connection::AddRandomTag(mpd_tag_type tag, size_t number, std::mt19937 &rng
return true;
}
bool Connection::AddRandomSongs(size_t number, std::string random_exclude_pattern, std::mt19937 &rng)
bool Connection::AddRandomSongs(size_t number, const std::string &random_exclude_pattern, std::mt19937 &rng)
{
prechecksNoCommandsList();
std::vector<std::string> files;

View File

@@ -547,7 +547,7 @@ struct Connection
int AddSong(const std::string &, int = -1); // returns id of added song
int AddSong(const Song &, int = -1); // returns id of added song
bool AddRandomTag(mpd_tag_type, size_t, std::mt19937 &rng);
bool AddRandomSongs(size_t number, std::string random_exclude_pattern, std::mt19937 &rng);
bool AddRandomSongs(size_t number, const std::string &random_exclude_pattern, std::mt19937 &rng);
void Add(const std::string &path);
void Delete(unsigned int pos);
void PlaylistDelete(const std::string &playlist, unsigned int pos);