From fb72dc1a4085547bce2a4d1b9a69b99a9f1ab784 Mon Sep 17 00:00:00 2001 From: Claire Xenia Wolf Date: Fri, 29 Dec 2023 19:20:44 +0100 Subject: [PATCH] Add constexpr hashlib default constructors Signed-off-by: Claire Xenia Wolf --- kernel/hashlib.h | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/kernel/hashlib.h b/kernel/hashlib.h index 47aba71a8..25aa94b80 100644 --- a/kernel/hashlib.h +++ b/kernel/hashlib.h @@ -420,7 +420,7 @@ public: operator const_iterator() const { return const_iterator(ptr, index); } }; - dict() + constexpr dict() { } @@ -855,7 +855,7 @@ public: operator const_iterator() const { return const_iterator(ptr, index); } }; - pool() + constexpr pool() { } @@ -1062,6 +1062,10 @@ public: const K *operator->() const { return &container[index]; } }; + constexpr idict() + { + } + int operator()(const K &key) { int hash = database.do_hash(key); @@ -1132,6 +1136,10 @@ class mfp public: typedef typename idict::const_iterator const_iterator; + constexpr mfp() + { + } + int operator()(const K &key) const { int i = database(key);