util/IntrusiveList: use auto
Fixes typos in the const_iterator return types, and fixes returning references to stack values.
This commit is contained in:
parent
af544bb16f
commit
838c057231
@ -396,17 +396,17 @@ public:
|
|||||||
return Cast(cursor);
|
return Cast(cursor);
|
||||||
}
|
}
|
||||||
|
|
||||||
iterator &operator++() noexcept {
|
auto &operator++() noexcept {
|
||||||
cursor = cursor->next;
|
cursor = cursor->next;
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
iterator &operator--() noexcept {
|
auto &operator--() noexcept {
|
||||||
cursor = cursor->prev;
|
cursor = cursor->prev;
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
iterator &operator--(int) noexcept {
|
auto operator--(int) noexcept {
|
||||||
auto old = *this;
|
auto old = *this;
|
||||||
cursor = cursor->prev;
|
cursor = cursor->prev;
|
||||||
return old;
|
return old;
|
||||||
@ -461,17 +461,17 @@ public:
|
|||||||
return Cast(cursor);
|
return Cast(cursor);
|
||||||
}
|
}
|
||||||
|
|
||||||
const_iterator &operator++() noexcept {
|
auto &operator++() noexcept {
|
||||||
cursor = cursor->next;
|
cursor = cursor->next;
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
iterator &operator--() noexcept {
|
auto &operator--() noexcept {
|
||||||
cursor = cursor->prev;
|
cursor = cursor->prev;
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
iterator &operator--(int) noexcept {
|
auto operator--(int) noexcept {
|
||||||
auto old = *this;
|
auto old = *this;
|
||||||
cursor = cursor->prev;
|
cursor = cursor->prev;
|
||||||
return old;
|
return old;
|
||||||
|
Loading…
Reference in New Issue
Block a user