1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-14 09:34:59 +00:00

AK: Make HashTable.h compile inside the SDL2 port

This commit is contained in:
Andreas Kling 2019-08-25 17:47:32 +02:00
parent 9bc3444626
commit 8f50d75184

View file

@ -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;