mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-01 11:59:27 +08:00
Add a noop deleter
This adds a no-op deleter, which is used in subsequent patches. gdb/ChangeLog 2019-05-08 Tom Tromey <tom@tromey.com> * common/gdb_unique_ptr.h (struct noop_deleter): New.
This commit is contained in:
@ -1,3 +1,7 @@
|
||||
2019-05-08 Tom Tromey <tom@tromey.com>
|
||||
|
||||
* common/gdb_unique_ptr.h (struct noop_deleter): New.
|
||||
|
||||
2019-05-08 Tom Tromey <tom@tromey.com>
|
||||
|
||||
* nto-tdep.c (nto_inferior_data_reg): Change type.
|
||||
|
@ -47,6 +47,13 @@ struct xfree_deleter<T[]>
|
||||
template<typename T> using unique_xmalloc_ptr
|
||||
= std::unique_ptr<T, xfree_deleter<T>>;
|
||||
|
||||
/* A no-op deleter. */
|
||||
template<typename T>
|
||||
struct noop_deleter
|
||||
{
|
||||
void operator() (T *ptr) const { }
|
||||
};
|
||||
|
||||
} /* namespace gdb */
|
||||
|
||||
#endif /* COMMON_GDB_UNIQUE_PTR_H */
|
||||
|
Reference in New Issue
Block a user