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);
|
||||
}
|
||||
|
||||
iterator &operator++() noexcept {
|
||||
auto &operator++() noexcept {
|
||||
cursor = cursor->next;
|
||||
return *this;
|
||||
}
|
||||
|
||||
iterator &operator--() noexcept {
|
||||
auto &operator--() noexcept {
|
||||
cursor = cursor->prev;
|
||||
return *this;
|
||||
}
|
||||
|
||||
iterator &operator--(int) noexcept {
|
||||
auto operator--(int) noexcept {
|
||||
auto old = *this;
|
||||
cursor = cursor->prev;
|
||||
return old;
|
||||
@ -461,17 +461,17 @@ public:
|
||||
return Cast(cursor);
|
||||
}
|
||||
|
||||
const_iterator &operator++() noexcept {
|
||||
auto &operator++() noexcept {
|
||||
cursor = cursor->next;
|
||||
return *this;
|
||||
}
|
||||
|
||||
iterator &operator--() noexcept {
|
||||
auto &operator--() noexcept {
|
||||
cursor = cursor->prev;
|
||||
return *this;
|
||||
}
|
||||
|
||||
iterator &operator--(int) noexcept {
|
||||
auto operator--(int) noexcept {
|
||||
auto old = *this;
|
||||
cursor = cursor->prev;
|
||||
return old;
|
||||
|
Loading…
Reference in New Issue
Block a user