]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
fix error type
authorRosen Penev <rosenp@gmail.com>
Tue, 5 Dec 2023 20:36:11 +0000 (12:36 -0800)
committerRosen Penev <rosenp@gmail.com>
Tue, 9 Jan 2024 00:09:26 +0000 (16:09 -0800)
runtime_error does not take rvalue parameters. It's a copy anyway.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
pdns/iputils.cc

index 55d8daad5a363f5c54d92320c0118682ffb1447b..0ea50d7c1fa1d4f57790aead5a9f09e3a75abf0d 100644 (file)
 
 /** these functions provide a very lightweight wrapper to the Berkeley sockets API. Errors -> exceptions! */
 
-static void RuntimeError(std::string&& error)
+static void RuntimeError(const std::string& error)
 {
-  throw runtime_error(std::move(error));
+  throw runtime_error(error);
 }
 
-static void NetworkErr(std::string&& error)
+static void NetworkErr(const std::string& error)
 {
-  throw NetworkError(std::move(error));
+  throw NetworkError(error);
 }
 
 int SSocket(int family, int type, int flags)