tag/Mask: wrap in class
This commit is contained in:
@@ -29,6 +29,7 @@
|
||||
#include "client/Client.hxx"
|
||||
#include "client/Response.hxx"
|
||||
#include "tag/ParseName.hxx"
|
||||
#include "tag/Mask.hxx"
|
||||
#include "util/ConstBuffer.hxx"
|
||||
#include "util/StringAPI.hxx"
|
||||
#include "SongFilter.hxx"
|
||||
@@ -191,7 +192,7 @@ handle_list(Client &client, Request args, Response &r)
|
||||
}
|
||||
|
||||
std::unique_ptr<SongFilter> filter;
|
||||
tag_mask_t group_mask = 0;
|
||||
TagMask group_mask = TagMask::None();
|
||||
|
||||
if (args.size == 1) {
|
||||
/* for compatibility with < 0.12.0 */
|
||||
@@ -216,7 +217,7 @@ handle_list(Client &client, Request args, Response &r)
|
||||
return CommandResult::ERROR;
|
||||
}
|
||||
|
||||
group_mask |= tag_mask_t(1) << unsigned(gt);
|
||||
group_mask |= gt;
|
||||
|
||||
args.pop_back();
|
||||
args.pop_back();
|
||||
@@ -231,7 +232,7 @@ handle_list(Client &client, Request args, Response &r)
|
||||
}
|
||||
|
||||
if (tagType < TAG_NUM_OF_ITEM_TYPES &&
|
||||
group_mask & (tag_mask_t(1) << tagType)) {
|
||||
group_mask.Test(TagType(tagType))) {
|
||||
r.Error(ACK_ERROR_ARG, "Conflicting group");
|
||||
return CommandResult::ERROR;
|
||||
}
|
||||
|
Reference in New Issue
Block a user