Commit f3c37e48 authored by Max Kellermann's avatar Max Kellermann

tag/Mask: add static_assert on the size of the mask

parent 49130c20
......@@ -26,6 +26,11 @@
class TagMask {
typedef uint_least32_t mask_t;
/* the mask must have enough bits to represent all tags
supported by MPD */
static_assert(TAG_NUM_OF_ITEM_TYPES <= sizeof(mask_t) * 8);
mask_t value;
explicit constexpr TagMask(uint_least32_t _value) noexcept
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment