]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
dnsdist: Add missing `noexcept` on move ctors/assignment operators 16822/head
authorRemi Gacogne <remi.gacogne@powerdns.com>
Thu, 5 Feb 2026 11:09:36 +0000 (12:09 +0100)
committerRemi Gacogne <remi.gacogne@powerdns.com>
Thu, 5 Feb 2026 11:09:36 +0000 (12:09 +0100)
Signed-off-by: Remi Gacogne <remi.gacogne@powerdns.com>
pdns/dnsdistdist/dnsdist-nghttp2.cc
pdns/dnsdistdist/dnsdist-tcp.hh

index be53ce1970a678e73b3711fec58151ec6c3e6b4d..5fde5345b76fc0e2e018dc4fb5adb21ab0e06cfb 100644 (file)
@@ -978,22 +978,13 @@ struct DoHClientCollection::DoHWorkerThread
   {
   }
 
-  DoHWorkerThread(pdns::channel::Sender<CrossProtocolQuery>&& sender) :
+  DoHWorkerThread(pdns::channel::Sender<CrossProtocolQuery>&& 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;
 
index 806d484ab51a87cfaf4e515e3cffc2966e16ec88..aaa9339955f351224dac274c5a2157d7c5c22b7e 100644 (file)
@@ -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;