output/Control: pass rvalue reference to move constructor

This commit is contained in:
Max Kellermann
2021-10-22 20:10:42 +02:00
parent 5ad53a7554
commit f0d66bf6a6
5 changed files with 17 additions and 11 deletions

View File

@@ -186,7 +186,8 @@ handle_moveoutput(Client &client, Request request, Response &response)
was_enabled);
else
/* copy the AudioOutputControl and add it to the output list */
dest_partition.outputs.AddCopy(output,was_enabled);
dest_partition.outputs.AddMoveFrom(std::move(*output),
was_enabled);
instance.EmitIdle(IDLE_OUTPUT);
return CommandResult::OK;