AK: Make HashTable.h compile inside the SDL2 port
This commit is contained in:
parent
9bc3444626
commit
8f50d75184
Notes:
sideshowbarker
2024-07-19 12:32:14 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/8f50d75184c
1 changed files with 2 additions and 2 deletions
|
@ -272,7 +272,7 @@ void HashTable<T, TraitsForT>::set(const T& value)
|
|||
template<typename T, typename TraitsForT>
|
||||
void HashTable<T, TraitsForT>::rehash(int new_capacity)
|
||||
{
|
||||
TemporaryChange change(m_rehashing, true);
|
||||
TemporaryChange<bool> change(m_rehashing, true);
|
||||
new_capacity *= 2;
|
||||
auto* new_buckets = new Bucket[new_capacity];
|
||||
auto* old_buckets = m_buckets;
|
||||
|
@ -292,7 +292,7 @@ void HashTable<T, TraitsForT>::rehash(int new_capacity)
|
|||
template<typename T, typename TraitsForT>
|
||||
void HashTable<T, TraitsForT>::clear()
|
||||
{
|
||||
TemporaryChange change(m_clearing, true);
|
||||
TemporaryChange<bool> change(m_clearing, true);
|
||||
if (m_buckets) {
|
||||
delete[] m_buckets;
|
||||
m_buckets = nullptr;
|
||||
|
|
Loading…
Add table
Reference in a new issue