From 2717a92f41b6a70f4aba3921113f7e82159671f2 Mon Sep 17 00:00:00 2001 From: Remi Gacogne Date: Thu, 1 Jun 2017 11:11:40 +0200 Subject: [PATCH] dnsdist: Get rid of std::move() calls preventing copy elision --- pdns/dnsdist-lua.cc | 8 ++++---- pdns/dnsdist.cc | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/pdns/dnsdist-lua.cc b/pdns/dnsdist-lua.cc index 89ce577f24..a56181b878 100644 --- a/pdns/dnsdist-lua.cc +++ b/pdns/dnsdist-lua.cc @@ -309,11 +309,11 @@ vector> setupLua(bool client, const std::string& confi if (ret->connected) { if(g_launchWork) { g_launchWork->push_back([ret]() { - ret->tid = move(thread(responderThread, ret)); + ret->tid = thread(responderThread, ret); }); } else { - ret->tid = move(thread(responderThread, ret)); + ret->tid = thread(responderThread, ret); } } @@ -470,11 +470,11 @@ vector> setupLua(bool client, const std::string& confi if (ret->connected) { if(g_launchWork) { g_launchWork->push_back([ret]() { - ret->tid = move(thread(responderThread, ret)); + ret->tid = thread(responderThread, ret); }); } else { - ret->tid = move(thread(responderThread, ret)); + ret->tid = thread(responderThread, ret); } } diff --git a/pdns/dnsdist.cc b/pdns/dnsdist.cc index 025dd8701f..592eae28e7 100644 --- a/pdns/dnsdist.cc +++ b/pdns/dnsdist.cc @@ -1505,7 +1505,7 @@ void* healthChecksThread() try { SConnect(dss->fd, dss->remote); dss->connected = true; - dss->tid = move(thread(responderThread, dss)); + dss->tid = thread(responderThread, dss); } catch(const std::runtime_error& error) { infolog("Error connecting to new server with address %s: %s", dss->remote.toStringWithPort(), error.what()); @@ -2184,7 +2184,7 @@ try auto ret=std::make_shared(ComboAddress(address, 53)); addServerToPool(localPools, "", ret); if (ret->connected) { - ret->tid = move(thread(responderThread, ret)); + ret->tid = thread(responderThread, ret); } g_dstates.modify([ret](servers_t& servers) { servers.push_back(ret); }); } -- 2.47.2