From 8b1540430107b0752485ab9e6a841dbbacd45681 Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Wed, 1 Jun 2022 14:52:28 -0600 Subject: [PATCH] Allow registry to refer to const types So far, the registry hasn't been used to refer to a 'const' type, but this changes with the gdbarch change. This patch arranges to let the registry store a pointer-to-const, by removing const in the 'set' method. --- gdb/registry.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gdb/registry.h b/gdb/registry.h index 54aad6b7c4d..3df4749ce24 100644 --- a/gdb/registry.h +++ b/gdb/registry.h @@ -117,7 +117,7 @@ public: void set (T *obj, DATA *data) const { registry *reg_obj = registry_accessor::get (obj); - reg_obj->set (m_key, data); + reg_obj->set (m_key, (typename std::remove_const *) data); } /* If this key uses the default deleter, then this method is -- 2.30.2