Skip to content
This repository was archived by the owner on Aug 16, 2024. It is now read-only.

Commit 3df42bb

Browse files
committed
Revert "删除复制构造函数与赋值构造函数; 新增SetHost和SetPort方法;"
This reverts commit 7a79deb.
1 parent abc1785 commit 3df42bb

File tree

2 files changed

+0
-30
lines changed

2 files changed

+0
-30
lines changed

include/mirai_bot.hpp

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,6 @@ using nlohmann::json;
3131
#ifdef CreateEvent
3232
#undef CreateEvent
3333
#endif
34-
#ifdef SetPort
35-
#undef SetPort
36-
#endif
3734

3835
namespace Cyan
3936
{
@@ -47,22 +44,8 @@ namespace Cyan
4744
* \param port port
4845
*/
4946
MiraiBot(const string& host, int port);
50-
MiraiBot(const MiraiBot&) = delete;
51-
MiraiBot& operator=(const MiraiBot&) = delete;
5247
~MiraiBot();
5348

54-
/**
55-
* \brief 设置 Host
56-
* \param host Host
57-
* \return MiraiBot 引用
58-
*/
59-
MiraiBot& SetHost(const string& host);
60-
/**
61-
* \brief 设置 Port
62-
* \param port Port
63-
* \return MiraiBot 引用
64-
*/
65-
MiraiBot& SetPort(int port);
6649
/**
6750
* \brief 获得 mirai-cpp 适配的 API 版本
6851
* \return 用数字表示的版本号 (10605)

src/mirai_bot.cpp

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -30,19 +30,6 @@ namespace Cyan
3030
{
3131
Release();
3232
}
33-
34-
MiraiBot& MiraiBot::SetHost(const string& host)
35-
{
36-
this->host_ = host;
37-
return *this;
38-
}
39-
40-
MiraiBot& MiraiBot::SetPort(int port)
41-
{
42-
this->port_ = port;
43-
return *this;
44-
}
45-
4633
string MiraiBot::GetSessionKey() const
4734
{
4835
return sessionKey_;

0 commit comments

Comments
 (0)