MXS-2002 Replace auto_ptr with unique_ptr

Given 'Derived : public Base', a unique_ptr<Derived> converts
implictly to a unique_ptr<Base>.
This commit is contained in:
Johan Wikman
2018-08-09 11:12:32 +03:00
parent 9cfd451a1d
commit 6335d3776c
7 changed files with 14 additions and 26 deletions

View File

@ -3309,7 +3309,7 @@ static void poll_add_event_to_dcb(DCB* dcb, GWBUF* buf, uint32_t ev)
if (task)
{
RoutingWorker* worker = static_cast<RoutingWorker*>(dcb->poll.owner);
worker->post(std::auto_ptr<FakeEventTask>(task), mxs::Worker::EXECUTE_QUEUED);
worker->post(std::unique_ptr<FakeEventTask>(task), mxs::Worker::EXECUTE_QUEUED);
}
else
{
@ -3523,7 +3523,7 @@ static bool dcb_add_to_worker(Worker* worker, DCB* dcb, uint32_t events)
Worker* worker = static_cast<RoutingWorker*>(dcb->poll.owner);
ss_dassert(worker);
if (worker->post(std::auto_ptr<AddDcbToWorker>(task), mxs::Worker::EXECUTE_QUEUED))
if (worker->post(std::unique_ptr<AddDcbToWorker>(task), mxs::Worker::EXECUTE_QUEUED))
{
rv = true;
}