X-Git-Url: http://git.lttng.org/?a=blobdiff_plain;f=src%2Fcommon%2Fmake-unique-wrapper.hpp;h=a0a4b541a2fd64bc7c01da8babd6b5c01bb54d5c;hb=HEAD;hp=282181cffa58439b9dd7642949a40701c3b67512;hpb=303ac4ed4037e45da1976c0951358ec19c5364d0;p=lttng-tools.git diff --git a/src/common/make-unique-wrapper.hpp b/src/common/make-unique-wrapper.hpp index 282181cff..bfb5d6bb2 100644 --- a/src/common/make-unique-wrapper.hpp +++ b/src/common/make-unique-wrapper.hpp @@ -9,6 +9,7 @@ #define LTTNG_MAKE_UNIQUE_WRAPPER_H #include +#include #include @@ -34,26 +35,11 @@ namespace lttng { * create_my_c_struct()); * * Note that this facility is intended for use in the scope of a function. - * If you need to return this unique_ptr instance, you should consider writting + * If you need to return this unique_ptr instance, you should consider writing * a proper, idiomatic, wrapper. */ namespace memory { -template -struct create_deleter_class { - struct deleter { - void operator()(WrappedType *instance) const - { - DeleterFunction(instance); - } - }; - - std::unique_ptr operator()(WrappedType *instance) const - { - return std::unique_ptr(instance); - } -}; - /* * 'free' is a utility function for use with make_unique_wrapper. It makes it easier to * wrap raw pointers that have to be deleted with `free`. Using libc's 'free' as