From 105c591bbe04c84d809ef6025a14000cc74b096b Mon Sep 17 00:00:00 2001 From: "Emil J. Tywoniak" Date: Thu, 27 Nov 2025 02:53:29 +0100 Subject: [PATCH] newcelltypes: use unordered_map --- kernel/newcelltypes.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/kernel/newcelltypes.h b/kernel/newcelltypes.h index e26de0569..c4a4ea329 100644 --- a/kernel/newcelltypes.h +++ b/kernel/newcelltypes.h @@ -548,8 +548,13 @@ struct NewCellType { }; struct NewCellTypes { + struct IdStringHash { + std::size_t operator()(const IdString id) const { + return static_cast(id.hash_top().yield()); + } + }; StaticCellTypes::Categories::Category static_cell_types = StaticCellTypes::categories.empty; - dict custom_cell_types = {}; + std::unordered_map custom_cell_types {}; NewCellTypes() { static_cell_types = StaticCellTypes::categories.empty;