diff options
author | Tom Tromey <tom@tromey.com> | 2022-06-01 14:52:28 -0600 |
---|---|---|
committer | Tom Tromey <tom@tromey.com> | 2022-08-04 13:28:04 -0600 |
commit | 8b1540430107b0752485ab9e6a841dbbacd45681 (patch) | |
tree | 703153a6cfe9eabe03eb195756af03a67cbf1ee2 /gdb/registry.h | |
parent | b987c79ac133c303adefad5caff19c530f86b7a4 (diff) | |
download | gdb-8b1540430107b0752485ab9e6a841dbbacd45681.zip gdb-8b1540430107b0752485ab9e6a841dbbacd45681.tar.gz gdb-8b1540430107b0752485ab9e6a841dbbacd45681.tar.bz2 |
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.
Diffstat (limited to 'gdb/registry.h')
-rw-r--r-- | gdb/registry.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gdb/registry.h b/gdb/registry.h index 54aad6b..3df4749 100644 --- a/gdb/registry.h +++ b/gdb/registry.h @@ -117,7 +117,7 @@ public: void set (T *obj, DATA *data) const { registry<T> *reg_obj = registry_accessor<T>::get (obj); - reg_obj->set (m_key, data); + reg_obj->set (m_key, (typename std::remove_const<DATA> *) data); } /* If this key uses the default deleter, then this method is |