Skip to content

Commit 3510a07

Browse files
Remove unnecessary move for pod type
1 parent e8862ad commit 3510a07

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

src/config.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -158,10 +158,10 @@ namespace config {
158158
}
159159

160160
struct prep_cmd_t {
161-
prep_cmd_t(std::string &&do_cmd, std::string &&undo_cmd, bool &&elevated):
162-
do_cmd(std::move(do_cmd)), undo_cmd(std::move(undo_cmd)), elevated(std::move(elevated)) {}
163-
explicit prep_cmd_t(std::string &&do_cmd, bool &&elevated):
164-
do_cmd(std::move(do_cmd)), elevated(std::move(elevated)) {}
161+
prep_cmd_t(std::string &&do_cmd, std::string &&undo_cmd, bool elevated):
162+
do_cmd(std::move(do_cmd)), undo_cmd(std::move(undo_cmd)), elevated(elevated) {}
163+
explicit prep_cmd_t(std::string &&do_cmd, bool elevated):
164+
do_cmd(std::move(do_cmd)), elevated(elevated) {}
165165
std::string do_cmd;
166166
std::string undo_cmd;
167167
bool elevated;

src/process.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -348,7 +348,7 @@ namespace proc {
348348
boost::filesystem::path working_dir = _app.working_dir.empty() ?
349349
find_working_directory(cmd.do_cmd, _env) :
350350
boost::filesystem::path(_app.working_dir);
351-
BOOST_LOG(info) << "Executing Do Cmd: ["sv << cmd.do_cmd << ']';
351+
BOOST_LOG(info) << "Executing Do Cmd: ["sv << cmd.do_cmd << "] elevated: " << cmd.elevated;
352352
auto child = platf::run_command(cmd.elevated, true, cmd.do_cmd, working_dir, _env, _pipe.get(), ec, nullptr);
353353

354354
if (ec) {
@@ -920,7 +920,8 @@ namespace proc {
920920
prep_cmds.emplace_back(
921921
std::move(do_cmd),
922922
std::move(undo_cmd),
923-
std::move(prep_cmd.elevated));
923+
prep_cmd.elevated
924+
);
924925
}
925926
}
926927

0 commit comments

Comments
 (0)