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:
parent
c8eaae3eaf
commit
6cbd72f54f
24 changed files with 3 additions and 63 deletions
10
AK/HashMap.h
10
AK/HashMap.h
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue