From f1566cfbf6ea26ef960fa07a801592c020be2eb1 Mon Sep 17 00:00:00 2001 From: Davin McCall Date: Fri, 26 May 2017 18:34:19 +0100 Subject: [PATCH] Fix various missing std::move's (which was an exception safety issue) --- src/service.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/service.h b/src/service.h index eefd4c5..136f408 100644 --- a/src/service.h +++ b/src/service.h @@ -418,7 +418,7 @@ class ServiceRecord this->service_type = service_type; this->depends_on = std::move(*pdepends_on); - program_name = command; + program_name = std::move(command); exec_arg_parts = separate_args(program_name, command_offsets); for (sr_iter i = depends_on.begin(); i != depends_on.end(); ++i) { @@ -502,12 +502,12 @@ class ServiceRecord void set_pid_file(string &&pid_file) noexcept { - this->pid_file = pid_file; + this->pid_file = std::move(pid_file); } void set_socket_details(string &&socket_path, int socket_perms, uid_t socket_uid, uid_t socket_gid) noexcept { - this->socket_path = socket_path; + this->socket_path = std::move(socket_path); this->socket_perms = socket_perms; this->socket_uid = socket_uid; this->socket_gid = socket_gid; -- 2.25.1