mirror of
https://github.com/EnderIce2/Fennix.git
synced 2025-07-01 10:29:16 +00:00
fix(kernel/std): handle empty list case in begin() and cbegin() methods in foward_list
This commit is contained in:
@ -400,9 +400,9 @@ namespace std
|
|||||||
const_iterator before_begin() const noexcept { return const_iterator(Head); }
|
const_iterator before_begin() const noexcept { return const_iterator(Head); }
|
||||||
const_iterator cbefore_begin() const noexcept { return const_iterator(Head); }
|
const_iterator cbefore_begin() const noexcept { return const_iterator(Head); }
|
||||||
|
|
||||||
iterator begin() noexcept { return iterator(Head->Next); }
|
iterator begin() noexcept { return Head ? iterator(Head->Next) : iterator(nullptr); }
|
||||||
const_iterator begin() const noexcept { return const_iterator(Head->Next); }
|
const_iterator begin() const noexcept { return Head ? const_iterator(Head->Next) : iterator(nullptr); }
|
||||||
const_iterator cbegin() const noexcept { return const_iterator(Head->Next); }
|
const_iterator cbegin() const noexcept { return Head ? const_iterator(Head->Next) : iterator(nullptr); }
|
||||||
|
|
||||||
iterator end() noexcept { return iterator(nullptr); }
|
iterator end() noexcept { return iterator(nullptr); }
|
||||||
const_iterator end() const noexcept { return const_iterator(nullptr); }
|
const_iterator end() const noexcept { return const_iterator(nullptr); }
|
||||||
|
Reference in New Issue
Block a user