diff --git a/core/queue.cpp b/core/queue.cpp index 7dd3e046..b869f9a9 100644 --- a/core/queue.cpp +++ b/core/queue.cpp @@ -19,7 +19,7 @@ Queue :: Queue() } Queue :: Queue(unsigned int f) - : _cur(-1), _flags(f & Q_FLAG_MASK), _length(0) + : _cur(-1), _flags(f), _length(0) { } diff --git a/include/core/queue.h b/include/core/queue.h index 374e247d..db2cb3e4 100644 --- a/include/core/queue.h +++ b/include/core/queue.h @@ -11,30 +11,18 @@ #include #include + /** - * Enum defining queue flags. + * Enum defining flags that effect a Queue's behavior. */ enum queue_flags { - /** Queue is enabled. */ - Q_ENABLED = (1 << 0), - - /** Queue will pick songs randomly. */ - Q_RANDOM = (1 << 1), - - /** Queue will not remove songs when picked. */ - Q_REPEAT = (1 << 2), - - /** Queue will not be sorted. */ - Q_NO_SORT = (1 << 3), + Q_ENABLED = (1 << 0), /**< Queue is enabled. */ + Q_RANDOM = (1 << 1), /**< Queue will pick songs randomly. */ + Q_REPEAT = (1 << 2), /**< Queue will not remove songs when picked. */ + Q_NO_SORT = (1 << 3), /**< Queue will not be sorted. */ }; -/** - * Mask of valid flags. - */ -static const unsigned int Q_FLAG_MASK = Q_ENABLED | Q_RANDOM | Q_REPEAT | Q_NO_SORT; - - /** * Track fields that can be compared. */ diff --git a/tests/core/queue.cpp b/tests/core/queue.cpp index 0a91f668..7b10bf9b 100644 --- a/tests/core/queue.cpp +++ b/tests/core/queue.cpp @@ -43,7 +43,7 @@ void test_default() void test_constructor(unsigned int flags) { - TestQueue q(flags | (1 << 30)); + TestQueue q(flags); test_equal(q.get_cur(), (unsigned)-1); test_equal(q.get_flags(), flags);