From 6da6832bfb49a196accfee8908986a47428862ff Mon Sep 17 00:00:00 2001 From: Rosen Penev Date: Tue, 5 Dec 2023 12:36:11 -0800 Subject: [PATCH] fix error type runtime_error does not take rvalue parameters. It's a copy anyway. Signed-off-by: Rosen Penev --- pdns/iputils.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pdns/iputils.cc b/pdns/iputils.cc index 55d8daad5a..0ea50d7c1f 100644 --- a/pdns/iputils.cc +++ b/pdns/iputils.cc @@ -35,14 +35,14 @@ /** 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) -- 2.47.2