Skip to content

Commit

Permalink
refactor: std::forward
Browse files Browse the repository at this point in the history
  • Loading branch information
braindigitalis authored Oct 8, 2024
1 parent 08b3841 commit 95270f5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion include/dpp/cluster.h
Original file line number Diff line number Diff line change
Expand Up @@ -493,7 +493,7 @@ class DPP_EXPORT cluster {
std::enable_if_t<std::is_same_v<std::invoke_result_t<F, const slashcommand_handler_t&>, dpp::task<void>>, 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<F>(handler));
return inserted;
};
#endif
Expand Down

0 comments on commit 95270f5

Please sign in to comment.