mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 06:17:35 +00:00
AK: Expose SinglyLinkedListIterator constructor
This commit replaces SinglyLinkedListIterator::universal_end() with an empty SinglyLinkedListIterator(). Piano needs this in order to initialize a member array of iterators without 84 lines of universal_end().
This commit is contained in:
parent
05ce8586ea
commit
121e7306c3
2 changed files with 5 additions and 5 deletions
|
@ -79,7 +79,7 @@ public:
|
|||
private:
|
||||
friend HashTableType;
|
||||
|
||||
explicit HashTableIterator(HashTableType& table, bool is_end, BucketIteratorType bucket_iterator = BucketIteratorType::universal_end(), size_t bucket_index = 0)
|
||||
explicit HashTableIterator(HashTableType& table, bool is_end, BucketIteratorType bucket_iterator = {}, size_t bucket_index = 0)
|
||||
: m_table(table)
|
||||
, m_bucket_index(bucket_index)
|
||||
, m_is_end(is_end)
|
||||
|
@ -87,7 +87,7 @@ private:
|
|||
{
|
||||
ASSERT(!table.m_clearing);
|
||||
ASSERT(!table.m_rehashing);
|
||||
if (!is_end && !m_table.is_empty() && !(m_bucket_iterator != BucketIteratorType::universal_end())) {
|
||||
if (!is_end && !m_table.is_empty() && m_bucket_iterator.is_end()) {
|
||||
m_bucket_iterator = m_table.bucket(0).begin();
|
||||
if (m_bucket_iterator.is_end())
|
||||
skip_to_next();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue