From: Remi Gacogne Date: Thu, 5 Feb 2026 11:09:36 +0000 (+0100) Subject: dnsdist: Add missing `noexcept` on move ctors/assignment operators X-Git-Tag: rec-5.5.0-alpha0~27^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F16822%2Fhead;p=thirdparty%2Fpdns.git dnsdist: Add missing `noexcept` on move ctors/assignment operators Signed-off-by: Remi Gacogne --- diff --git a/pdns/dnsdistdist/dnsdist-nghttp2.cc b/pdns/dnsdistdist/dnsdist-nghttp2.cc index be53ce1970..5fde5345b7 100644 --- a/pdns/dnsdistdist/dnsdist-nghttp2.cc +++ b/pdns/dnsdistdist/dnsdist-nghttp2.cc @@ -978,22 +978,13 @@ struct DoHClientCollection::DoHWorkerThread { } - DoHWorkerThread(pdns::channel::Sender&& sender) : + DoHWorkerThread(pdns::channel::Sender&& sender) noexcept : d_sender(std::move(sender)) { } - DoHWorkerThread(DoHWorkerThread&& rhs) : - d_sender(std::move(rhs.d_sender)) - { - } - - DoHWorkerThread& operator=(DoHWorkerThread&& rhs) - { - d_sender = std::move(rhs.d_sender); - return *this; - } - + DoHWorkerThread(DoHWorkerThread&& rhs) noexcept = default; + DoHWorkerThread& operator=(DoHWorkerThread&& rhs) noexcept = default; DoHWorkerThread(const DoHWorkerThread& rhs) = delete; DoHWorkerThread& operator=(const DoHWorkerThread&) = delete; diff --git a/pdns/dnsdistdist/dnsdist-tcp.hh b/pdns/dnsdistdist/dnsdist-tcp.hh index 806d484ab5..aaa9339955 100644 --- a/pdns/dnsdistdist/dnsdist-tcp.hh +++ b/pdns/dnsdistdist/dnsdist-tcp.hh @@ -38,7 +38,7 @@ struct ConnectionInfo remote(remote_), cs(cs_), fd(-1) { } - ConnectionInfo(ConnectionInfo&& rhs) : + ConnectionInfo(ConnectionInfo&& rhs) noexcept : remote(rhs.remote), cs(rhs.cs), fd(rhs.fd), d_restricted(rhs.d_restricted) { rhs.cs = nullptr; @@ -48,7 +48,7 @@ struct ConnectionInfo ConnectionInfo(const ConnectionInfo& rhs) = delete; ConnectionInfo& operator=(const ConnectionInfo& rhs) = delete; - ConnectionInfo& operator=(ConnectionInfo&& rhs) + ConnectionInfo& operator=(ConnectionInfo&& rhs) noexcept { remote = rhs.remote; cs = rhs.cs;