Skip to content

Commit 4f40fa2

Browse files
committed
fix naming to resolve coroutines conflict with regular functions
1 parent 8f62576 commit 4f40fa2

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

include/dpp/cluster.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -477,7 +477,7 @@ class DPP_EXPORT cluster {
477477
* @return bool Returns `true` if the command was registered successfully, or `false` if
478478
* the command with the same name already exists
479479
*/
480-
bool register_command(const std::string& name, const slashcommand_handler_t& handler);
480+
bool register_command(const std::string& name, const slashcommand_handler_t handler);
481481

482482
#ifdef DPP_CORO
483483
/**
@@ -489,7 +489,7 @@ class DPP_EXPORT cluster {
489489
* @return bool Returns `true` if the command was registered successfully, or `false` if
490490
* the command with the same name already exists.
491491
*/
492-
bool register_command(const std::string& name, const co_slashcommand_handler_t& handler);
492+
bool co_register_command(const std::string& name, const co_slashcommand_handler_t handler);
493493
#endif
494494

495495
/**

src/dpp/cluster.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -499,7 +499,7 @@ cluster& cluster::set_request_timeout(uint16_t timeout) {
499499
return *this;
500500
}
501501

502-
bool cluster::register_command(const std::string &name, const slashcommand_handler_t& handler) {
502+
bool cluster::register_command(const std::string &name, const slashcommand_handler_t handler) {
503503
std::unique_lock lk(named_commands_mutex);
504504
if (named_commands.count(name) != 0) {
505505
return false;
@@ -509,7 +509,7 @@ bool cluster::register_command(const std::string &name, const slashcommand_handl
509509
}
510510

511511
#ifdef DPP_CORO
512-
bool cluster::register_command(const std::string& name, const co_slashcommand_handler_t& handler) {
512+
bool cluster::co_register_command(const std::string& name, const co_slashcommand_handler_t handler) {
513513
std::unique_lock lk(named_commands_mutex);
514514
if (named_commands.count(name) != 0) {
515515
return false;

0 commit comments

Comments
 (0)