From f8d7b4daea679048926883ba2f23527360ad435d Mon Sep 17 00:00:00 2001 From: Ben Wiederhake Date: Thu, 16 Sep 2021 00:00:33 +0200 Subject: [PATCH] AK: Add missing headers Example failure: IDAllocator.h only pulls in AK/Hashtable.h, so any compilation unit that includes AK/IDAllocator.h without including AK/Traits.h before it used to be doomed to fail with the cryptic error message "In instantiation of 'AK::HashTable::Iterator AK::HashTable::find(const T&) [with T = int; TraitsForT = AK::Traits: incomplete type 'AK::Traits' used in nested name specifier". --- AK/BinaryHeap.h | 2 ++ AK/HashTable.h | 1 + AK/IntrusiveDetails.h | 2 ++ AK/StringHash.h | 2 ++ 4 files changed, 7 insertions(+) diff --git a/AK/BinaryHeap.h b/AK/BinaryHeap.h index 08d1bbae2fe..1fce7483669 100644 --- a/AK/BinaryHeap.h +++ b/AK/BinaryHeap.h @@ -6,6 +6,8 @@ #pragma once +#include + namespace AK { template diff --git a/AK/HashTable.h b/AK/HashTable.h index b075853b6e2..b50d4486d50 100644 --- a/AK/HashTable.h +++ b/AK/HashTable.h @@ -9,6 +9,7 @@ #include #include #include +#include #include #include diff --git a/AK/IntrusiveDetails.h b/AK/IntrusiveDetails.h index 7cf9a04093e..180979b3739 100644 --- a/AK/IntrusiveDetails.h +++ b/AK/IntrusiveDetails.h @@ -6,6 +6,8 @@ #pragma once +#include + namespace AK::Detail { template diff --git a/AK/StringHash.h b/AK/StringHash.h index 7b01b48bba0..1e28c8426d2 100644 --- a/AK/StringHash.h +++ b/AK/StringHash.h @@ -6,6 +6,8 @@ #pragma once +#include + namespace AK { constexpr u32 string_hash(char const* characters, size_t length)