From 95270f523199ff5b463872fc9fdcf911534258cf Mon Sep 17 00:00:00 2001 From: "Craig Edwards (Brain)" Date: Wed, 9 Oct 2024 00:08:42 +0100 Subject: [PATCH] refactor: std::forward --- include/dpp/cluster.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/dpp/cluster.h b/include/dpp/cluster.h index 787b95d854..0b6a980e65 100644 --- a/include/dpp/cluster.h +++ b/include/dpp/cluster.h @@ -493,7 +493,7 @@ class DPP_EXPORT cluster { std::enable_if_t, dpp::task>, bool> register_command(const std::string& name, F&& handler){ std::unique_lock lk(named_commands_mutex); - auto [_, inserted] = named_commands.try_emplace(name, handler); + auto [_, inserted] = named_commands.try_emplace(name, std::forward(handler)); return inserted; }; #endif