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

Commit 37ed3d7

Browse files
authored
Merge pull request #30 from cyanray/dev/cyanray
修改文件编码为UTF-8;
2 parents ecf4bae + a94554c commit 37ed3d7

File tree

12 files changed

+20
-20
lines changed

12 files changed

+20
-20
lines changed

include/defs/group_config.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
namespace Cyan
99
{
10-
// ȺÉèÖÃ
10+
// 群设置
1111
class GroupConfig : public ISerializable
1212
{
1313
public:

include/defs/message_chain.hpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -69,13 +69,13 @@ namespace Cyan
6969
return *m;
7070
}
7171
}
72-
throw std::runtime_error("没有找到指定类型的元素");
72+
throw std::runtime_error("没有找到指定类型的元素");
7373
}
7474

7575
template<class T>
7676
MessageChain& Add(const T& m)
7777
{
78-
static_assert(std::is_base_of<IMessage, T>::value, "只能接受 IMessage 的派生类");
78+
static_assert(std::is_base_of<IMessage, T>::value, "只能接受 IMessage 的派生类");
7979
std::shared_ptr<IMessage> m_ptr(new T(m));
8080
messages_.push_back(m_ptr);
8181
return *this;
@@ -84,7 +84,7 @@ namespace Cyan
8484
template<class T,class... Args>
8585
MessageChain& Add(Args&&... args)
8686
{
87-
static_assert(std::is_base_of<IMessage, T>::value, "只能接受 IMessage 的派生类");
87+
static_assert(std::is_base_of<IMessage, T>::value, "只能接受 IMessage 的派生类");
8888
std::shared_ptr<IMessage> m_ptr(new T(args...));
8989
messages_.push_back(m_ptr);
9090
return *this;
@@ -93,7 +93,7 @@ namespace Cyan
9393
template<class T>
9494
void Remove(const T& m)
9595
{
96-
static_assert(std::is_base_of<IMessage, T>::value, "只能接受 IMessage 的派生类");
96+
static_assert(std::is_base_of<IMessage, T>::value, "只能接受 IMessage 的派生类");
9797
messages_.erase(std::remove_if(messages_.begin(), messages_.end(),
9898
[&](std::shared_ptr<IMessage> item)
9999
{

include/defs/messages/AppMessage.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ namespace Cyan
3030
virtual bool Set(const json& json) override
3131
{
3232
if (json["type"].is_null() || json["type"].get<string>() != this->GetType())
33-
throw std::runtime_error("¸ø¶¨µÄjson²»ÕýÈ·");
33+
throw std::runtime_error("给定的json不正确");
3434
content_ = json["content"].get<string>();
3535
return true;
3636
}

include/defs/messages/AtAllMessage.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ namespace Cyan
2929
virtual bool Set(const json& json) override
3030
{
3131
if (json["type"].is_null() || json["type"].get<string>() != this->GetType())
32-
throw std::runtime_error("¸ø¶¨µÄjson²»ÕýÈ·");
32+
throw std::runtime_error("给定的json不正确");
3333
return true;
3434
}
3535
virtual json ToJson() const override

include/defs/messages/AtMessage.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ namespace Cyan
3131
virtual bool Set(const json& json) override
3232
{
3333
if (json["type"].is_null() || json["type"].get<string>() != this->GetType())
34-
throw std::runtime_error("¸ø¶¨µÄjson²»ÕýÈ·");
34+
throw std::runtime_error("给定的json不正确");
3535
target_ = QQ_t(json["target"].get<int64_t>());
3636
if (!json["display"].is_null())
3737
display_ = json["display"].get<string>();

include/defs/messages/FaceMessage.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ namespace Cyan
3030
virtual bool Set(const json& json) override
3131
{
3232
if (json["type"].is_null() || json["type"].get<string>() != this->GetType())
33-
throw std::runtime_error("¸ø¶¨µÄjson²»ÕýÈ·");
33+
throw std::runtime_error("给定的json不正确");
3434
faceId_ = json["faceId"].get<int64_t>();
3535
name_ = json["name"].get<string>();
3636
return true;

include/defs/messages/ImageMessage.hpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,25 +25,25 @@ namespace Cyan
2525
{
2626
if (auto m_ptr = dynamic_cast<const ImageMessage*>(&m))
2727
{
28-
// 用 ImageId 作为判断依据,必须有一个 ImageId 不为空
28+
// 用 ImageId 作为判断依据,必须有一个 ImageId 不为空
2929
if (!m_ptr->imageId_.empty() || !this->imageId_.empty())
3030
{
3131
return (m_ptr->imageId_ == this->imageId_);
3232
}
33-
// 如果 ImageId 都为空,那么用 url 再判断一下
33+
// 如果 ImageId 都为空,那么用 url 再判断一下
3434
if (!m_ptr->url_.empty() || !this->url_.empty())
3535
{
3636
return (m_ptr->url_ == this->url_);
3737
}
38-
// 如果 url 都为空,那么用 path 再判断一下
38+
// 如果 url 都为空,那么用 path 再判断一下
3939
if (!m_ptr->path_.empty() || !this->path_.empty())
4040
{
4141
return (m_ptr->path_ == this->path_);
4242
}
43-
// 三个参数都为空,两个空的 ImageMessage 当然是相等的:
43+
// 三个参数都为空,两个空的 ImageMessage 当然是相等的:
4444
return true;
4545
}
46-
// 类型都不同,直接不相等:
46+
// 类型都不同,直接不相等:
4747
return false;
4848
}
4949
virtual bool operator!=(const IMessage& m) const override
@@ -53,7 +53,7 @@ namespace Cyan
5353
virtual bool Set(const json& json) override
5454
{
5555
if (json["type"].is_null() || json["type"].get<string>() != this->GetType())
56-
throw std::runtime_error("给定的json不正确");
56+
throw std::runtime_error("给定的json不正确");
5757
if (!json["imageId"].is_null())
5858
imageId_ = json["imageId"].get<string>();
5959
if (!json["url"].is_null())

include/defs/messages/JsonMessage.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ namespace Cyan
3030
virtual bool Set(const json& json) override
3131
{
3232
if (json["type"].is_null() || json["type"].get<string>() != this->GetType())
33-
throw std::runtime_error("¸ø¶¨µÄjson²»ÕýÈ·");
33+
throw std::runtime_error("给定的json不正确");
3434
json_ = json["json"].get<string>();
3535
return true;
3636
}

include/defs/messages/PlainMessage.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ namespace Cyan
3030
virtual bool Set(const json& json) override
3131
{
3232
if (json["type"].is_null() || json["type"].get<string>() != this->GetType())
33-
throw std::runtime_error("¸ø¶¨µÄjson²»ÕýÈ·");
33+
throw std::runtime_error("给定的json不正确");
3434
text_ = json["text"].get<string>();
3535
return true;
3636
}

include/defs/messages/PokeMessage.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ namespace Cyan
4343
virtual bool Set(const json& json) override
4444
{
4545
if (json["type"].is_null() || json["type"].get<string>() != this->GetType())
46-
throw std::runtime_error("¸ø¶¨µÄjson²»ÕýÈ·");
46+
throw std::runtime_error("给定的json不正确");
4747
name_ = json["name"].get<string>();
4848
for (int i = 0; i < 6; ++i)
4949
{

0 commit comments

Comments
 (0)