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:
parent
bdb3ed9e63
commit
31930bd34d
@ -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>
|
2019-05-08 Tom Tromey <tom@tromey.com>
|
||||||
|
|
||||||
* nto-tdep.c (nto_inferior_data_reg): Change type.
|
* nto-tdep.c (nto_inferior_data_reg): Change type.
|
||||||
|
@ -47,6 +47,13 @@ struct xfree_deleter<T[]>
|
|||||||
template<typename T> using unique_xmalloc_ptr
|
template<typename T> using unique_xmalloc_ptr
|
||||||
= std::unique_ptr<T, xfree_deleter<T>>;
|
= std::unique_ptr<T, xfree_deleter<T>>;
|
||||||
|
|
||||||
|
/* A no-op deleter. */
|
||||||
|
template<typename T>
|
||||||
|
struct noop_deleter
|
||||||
|
{
|
||||||
|
void operator() (T *ptr) const { }
|
||||||
|
};
|
||||||
|
|
||||||
} /* namespace gdb */
|
} /* namespace gdb */
|
||||||
|
|
||||||
#endif /* COMMON_GDB_UNIQUE_PTR_H */
|
#endif /* COMMON_GDB_UNIQUE_PTR_H */
|
||||||
|
Loading…
Reference in New Issue
Block a user