mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 11:28:12 +00:00
AK: Make HashTable.h compile inside the SDL2 port
This commit is contained in:
parent
9bc3444626
commit
8f50d75184
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>
|
template<typename T, typename TraitsForT>
|
||||||
void HashTable<T, TraitsForT>::rehash(int new_capacity)
|
void HashTable<T, TraitsForT>::rehash(int new_capacity)
|
||||||
{
|
{
|
||||||
TemporaryChange change(m_rehashing, true);
|
TemporaryChange<bool> change(m_rehashing, true);
|
||||||
new_capacity *= 2;
|
new_capacity *= 2;
|
||||||
auto* new_buckets = new Bucket[new_capacity];
|
auto* new_buckets = new Bucket[new_capacity];
|
||||||
auto* old_buckets = m_buckets;
|
auto* old_buckets = m_buckets;
|
||||||
|
@ -292,7 +292,7 @@ void HashTable<T, TraitsForT>::rehash(int new_capacity)
|
||||||
template<typename T, typename TraitsForT>
|
template<typename T, typename TraitsForT>
|
||||||
void HashTable<T, TraitsForT>::clear()
|
void HashTable<T, TraitsForT>::clear()
|
||||||
{
|
{
|
||||||
TemporaryChange change(m_clearing, true);
|
TemporaryChange<bool> change(m_clearing, true);
|
||||||
if (m_buckets) {
|
if (m_buckets) {
|
||||||
delete[] m_buckets;
|
delete[] m_buckets;
|
||||||
m_buckets = nullptr;
|
m_buckets = nullptr;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue