1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 03:37:45 +00:00

AK: Remove bitrotted Traits::dump() mechanism

This was only used by HashTable::dump() which I used when doing the
first HashTable implementation. Removing this allows us to also remove
most includes of <AK/kstdio.h>.
This commit is contained in:
Andreas Kling 2020-02-10 11:55:34 +01:00
parent c8eaae3eaf
commit 6cbd72f54f
24 changed files with 3 additions and 63 deletions

View file

@ -30,7 +30,6 @@
#include <AK/Optional.h>
#include <AK/StdLibExtras.h>
#include <AK/Vector.h>
#include <AK/kstdio.h>
namespace AK {
@ -45,13 +44,6 @@ private:
struct EntryTraits {
static unsigned hash(const Entry& entry) { return KeyTraits::hash(entry.key); }
static bool equals(const Entry& a, const Entry& b) { return KeyTraits::equals(a.key, b.key); }
static void dump(const Entry& entry)
{
kprintf("key=");
KeyTraits::dump(entry.key);
kprintf(" value=");
Traits<V>::dump(entry.value);
}
};
public:
@ -102,8 +94,6 @@ public:
void ensure_capacity(int capacity) { m_table.ensure_capacity(capacity); }
void dump() const { m_table.dump(); }
Optional<typename Traits<V>::PeekType> get(const K& key) const
{
auto it = find(key);