aboutsummaryrefslogtreecommitdiffstats
path: root/src/command/QueueCommands.cxx
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2014-04-24 09:43:08 +0200
committerMax Kellermann <max@duempel.org>2014-04-24 09:59:59 +0200
commitb999e16406ca7cdf38b1364cee48be50e2f1d756 (patch)
tree7d5cbe3e11ac724fbc5e2cb2ced802c930b5cb0d /src/command/QueueCommands.cxx
parent7fb9bebd463afc67909ae9220e38a6d3ca938c12 (diff)
downloadmpd-b999e16406ca7cdf38b1364cee48be50e2f1d756.tar.gz
mpd-b999e16406ca7cdf38b1364cee48be50e2f1d756.tar.xz
mpd-b999e16406ca7cdf38b1364cee48be50e2f1d756.zip
SongFilter: convert argv to ConstBuffer
Diffstat (limited to '')
-rw-r--r--src/command/QueueCommands.cxx5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/command/QueueCommands.cxx b/src/command/QueueCommands.cxx
index 81e5098bb..fbcd0e8ba 100644
--- a/src/command/QueueCommands.cxx
+++ b/src/command/QueueCommands.cxx
@@ -31,6 +31,7 @@
#include "protocol/ArgParser.hxx"
#include "protocol/Result.hxx"
#include "ls.hxx"
+#include "util/ConstBuffer.hxx"
#include "util/UriUtil.hxx"
#include "util/Error.hxx"
#include "fs/AllocatedPath.hxx"
@@ -231,8 +232,10 @@ static CommandResult
handle_playlist_match(Client &client, int argc, char *argv[],
bool fold_case)
{
+ ConstBuffer<const char *> args(argv + 1, argc - 1);
+
SongFilter filter;
- if (!filter.Parse(argc - 1, argv + 1, fold_case)) {
+ if (!filter.Parse(args, fold_case)) {
command_error(client, ACK_ERROR_ARG, "incorrect arguments");
return CommandResult::ERROR;
}