From 9231f420c199a7c12cb8aad17bcca80a0aaca6ad Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Tue, 11 Aug 2015 22:34:22 +0200 Subject: protocol/ArgParser: overload as ParseCommandArg(), pass references --- src/command/PlaylistCommands.cxx | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'src/command/PlaylistCommands.cxx') diff --git a/src/command/PlaylistCommands.cxx b/src/command/PlaylistCommands.cxx index 56da71078..f6f610d7a 100644 --- a/src/command/PlaylistCommands.cxx +++ b/src/command/PlaylistCommands.cxx @@ -146,8 +146,7 @@ handle_playlistdelete(Client &client, Request args) { const char *const name = args[0]; unsigned from; - - if (!check_unsigned(client, &from, args[1])) + if (!ParseCommandArg(client, from, args[1])) return CommandResult::ERROR; Error error; @@ -161,10 +160,9 @@ handle_playlistmove(Client &client, Request args) { const char *const name = args.front(); unsigned from, to; - - if (!check_unsigned(client, &from, args[1])) + if (!ParseCommandArg(client, from, args[1])) return CommandResult::ERROR; - if (!check_unsigned(client, &to, args[2])) + if (!ParseCommandArg(client, to, args[2])) return CommandResult::ERROR; Error error; -- cgit v1.2.3