From 2a744b4b82823c763d0465124052b690e1a441bc Mon Sep 17 00:00:00 2001 From: "N. Engelhardt" Date: Fri, 6 Dec 2024 11:18:39 +0100 Subject: [PATCH] add hash method to scopeindex cursor --- kernel/scopeinfo.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/kernel/scopeinfo.h b/kernel/scopeinfo.h index 71af70344ce..8c6e99fc066 100644 --- a/kernel/scopeinfo.h +++ b/kernel/scopeinfo.h @@ -169,6 +169,10 @@ class IdTree return !(*this == other); } + int hash() const { + return mkhash(scope_name.hash(), hash_ptr_ops::hash(target)); + } + bool valid() const { return target != nullptr; }