make it auto also

This commit is contained in:
Dmitrii Tiukalov 2021-08-27 23:52:56 +02:00 committed by GitHub
parent bcab58610a
commit 820090f1d9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -47,7 +47,7 @@ public:
template <typename T>
static void QueueUserWorkItem(void (T::*function)(void), T* object, ULONG flags = WT_EXECUTELONGFUNCTION) {
typedef std::pair<void (T::*)(), T*> CallbackType;
std::unique_ptr<CallbackType> p = std::make_unique<CallbackType>(function, object);
auto p = std::make_unique<CallbackType>(function, object);
if (::QueueUserWorkItem(ThreadProc<T>, p.get(), flags)) {
// The ThreadProc now has the responsibility of deleting the pair.