mirror of
git://sourceware.org/git/libabigail.git
synced 2024-12-16 15:04:46 +00:00
Factorize a no-op deleter for shared pointer
* include/abg-sptr-utils.h (struct noop_deleter): Move this here from ... * src/abg-comparison.cc (struct noop_deleter): ... here. Signed-off-by: Dodji Seketeli <dodji@redhat.com>
This commit is contained in:
parent
56ee6cdcc5
commit
4e44ee383c
@ -73,6 +73,15 @@ template<>
|
||||
regex_t_sptr
|
||||
build_sptr<regex_t>(regex_t *p);
|
||||
|
||||
/// A deleter for shared pointers that ... doesn't delete the object
|
||||
/// managed by the shared pointer.
|
||||
struct noop_deleter
|
||||
{
|
||||
template<typename T>
|
||||
void
|
||||
operator()(const T*)
|
||||
{}
|
||||
};
|
||||
}// end namespace sptr_utils
|
||||
}// end namespace abigail
|
||||
|
||||
|
@ -29,6 +29,7 @@
|
||||
#include "abg-hash.h"
|
||||
#include "abg-comparison.h"
|
||||
#include "abg-comp-filter.h"
|
||||
#include "abg-sptr-utils.h"
|
||||
|
||||
namespace abigail
|
||||
{
|
||||
@ -40,16 +41,7 @@ namespace comparison
|
||||
using std::vector;
|
||||
using std::tr1::dynamic_pointer_cast;
|
||||
using std::tr1::static_pointer_cast;
|
||||
|
||||
/// A deleter for shared pointers that ... doesn't delete the object
|
||||
/// managed by the shared pointer.
|
||||
struct noop_deleter
|
||||
{
|
||||
template<typename T>
|
||||
void
|
||||
operator()(const T*)
|
||||
{}
|
||||
};
|
||||
using abigail::sptr_utils::noop_deleter;
|
||||
|
||||
/// Convenience typedef for a pair of decls.
|
||||
typedef std::pair<const decl_base_sptr, const decl_base_sptr> decls_type;
|
||||
|
Loading…
Reference in New Issue
Block a user