From: Remi Gacogne Date: Thu, 1 Jun 2017 09:11:40 +0000 (+0200) Subject: dnsdist: Get rid of std::move() calls preventing copy elision X-Git-Tag: rec-4.1.0-alpha1~99^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F5359%2Fhead;p=thirdparty%2Fpdns.git dnsdist: Get rid of std::move() calls preventing copy elision --- 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); }); }