Remove unnecessary move for pod type

This commit is contained in:
Yukino Song
2024-10-09 05:31:15 +08:00
parent e8862ad77b
commit 3510a07c68
2 changed files with 7 additions and 6 deletions

View File

@@ -158,10 +158,10 @@ namespace config {
}
struct prep_cmd_t {
prep_cmd_t(std::string &&do_cmd, std::string &&undo_cmd, bool &&elevated):
do_cmd(std::move(do_cmd)), undo_cmd(std::move(undo_cmd)), elevated(std::move(elevated)) {}
explicit prep_cmd_t(std::string &&do_cmd, bool &&elevated):
do_cmd(std::move(do_cmd)), elevated(std::move(elevated)) {}
prep_cmd_t(std::string &&do_cmd, std::string &&undo_cmd, bool elevated):
do_cmd(std::move(do_cmd)), undo_cmd(std::move(undo_cmd)), elevated(elevated) {}
explicit prep_cmd_t(std::string &&do_cmd, bool elevated):
do_cmd(std::move(do_cmd)), elevated(elevated) {}
std::string do_cmd;
std::string undo_cmd;
bool elevated;