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:
@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user