protocol/ArgParser: overload as ParseCommandArg(), pass references

This commit is contained in:
Max Kellermann
2015-08-11 22:34:22 +02:00
parent 0f92d021a1
commit 9231f420c1
8 changed files with 56 additions and 71 deletions

View File

@@ -32,7 +32,7 @@ CommandResult
handle_addtagid(Client &client, Request args)
{
unsigned song_id;
if (!check_unsigned(client, &song_id, args.front()))
if (!ParseCommandArg(client, song_id, args.front()))
return CommandResult::ERROR;
const char *const tag_name = args[1];
@@ -57,7 +57,7 @@ CommandResult
handle_cleartagid(Client &client, Request args)
{
unsigned song_id;
if (!check_unsigned(client, &song_id, args.front()))
if (!ParseCommandArg(client, song_id, args.front()))
return CommandResult::ERROR;
TagType tag_type = TAG_NUM_OF_ITEM_TYPES;