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

Commit d2fd034

Browse files
committed
简化头文件结构
1 parent 0dbda10 commit d2fd034

File tree

6 files changed

+224
-250
lines changed

6 files changed

+224
-250
lines changed

include/FriendMessage.h

Lines changed: 0 additions & 50 deletions
This file was deleted.

include/GroupMessage.h

Lines changed: 0 additions & 50 deletions
This file was deleted.

include/message_chain.hpp

Lines changed: 0 additions & 113 deletions
This file was deleted.

include/mirai.hpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,6 @@
1010
#include <functional>
1111
#include <nlohmann/json.hpp>
1212
#include "typedef.hpp"
13-
#include "FriendMessage.h"
14-
#include "GroupMessage.h"
15-
#include "message_chain.hpp"
1613
using std::string;
1714
using std::runtime_error;
1815
using std::vector;

include/serializable.hpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,10 @@ namespace Cyan
1414
Serializable() {}
1515
virtual bool Set(const json& json) = 0;
1616
virtual json ToJson() const = 0;
17-
virtual string ToString() const = 0;
17+
virtual string ToString() const
18+
{
19+
return ToJson().dump();
20+
}
1821
virtual ~Serializable() {}
1922
};
2023

0 commit comments

Comments
 (0)