Skip to content

Commit 95270f5

Browse files
refactor: std::forward
1 parent 08b3841 commit 95270f5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

include/dpp/cluster.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -493,7 +493,7 @@ class DPP_EXPORT cluster {
493493
std::enable_if_t<std::is_same_v<std::invoke_result_t<F, const slashcommand_handler_t&>, dpp::task<void>>, bool>
494494
register_command(const std::string& name, F&& handler){
495495
std::unique_lock lk(named_commands_mutex);
496-
auto [_, inserted] = named_commands.try_emplace(name, handler);
496+
auto [_, inserted] = named_commands.try_emplace(name, std::forward<F>(handler));
497497
return inserted;
498498
};
499499
#endif

0 commit comments

Comments
 (0)