mirror of
https://git.suyu.dev/suyu/suyu.git
synced 2024-12-23 08:50:57 +01:00
Fixes to multilevelqueue's iterator.
This commit is contained in:
parent
dde0814837
commit
f35e09fe0d
1 changed files with 5 additions and 1 deletions
|
@ -35,7 +35,11 @@ public:
|
||||||
using difference_type = typename std::pointer_traits<pointer>::difference_type;
|
using difference_type = typename std::pointer_traits<pointer>::difference_type;
|
||||||
|
|
||||||
friend bool operator==(const iterator_impl& lhs, const iterator_impl& rhs) {
|
friend bool operator==(const iterator_impl& lhs, const iterator_impl& rhs) {
|
||||||
return (lhs.IsEnd() && rhs.IsEnd()) || lhs.it == rhs.it;
|
if (lhs.IsEnd() && rhs.IsEnd())
|
||||||
|
return true;
|
||||||
|
if (lhs.current_priority == rhs.current_priority)
|
||||||
|
return lhs.it == rhs.it;
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
friend bool operator!=(const iterator_impl& lhs, const iterator_impl& rhs) {
|
friend bool operator!=(const iterator_impl& lhs, const iterator_impl& rhs) {
|
||||||
|
|
Loading…
Reference in a new issue