diff options
| author | littleblack111 <littleblack11111@gmail.com> | 2025-06-11 19:55:25 +0800 |
|---|---|---|
| committer | littleblack111 <littleblack11111@gmail.com> | 2025-06-11 19:55:25 +0800 |
| commit | 9d1452447481d45344a1e33446ad9a418e9ea64f (patch) | |
| tree | 9fdaf4301c461f23eec210663874b3cdd567779b /src/chatManager.hpp | |
| parent | e30f6eb6872d57f7da764690589c2f0c9ffdb53b (diff) | |
internal: fully discard the use of uintptr_t for identification use
Diffstat (limited to 'src/chatManager.hpp')
| -rw-r--r-- | src/chatManager.hpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/chatManager.hpp b/src/chatManager.hpp index b48dcdb..227ef6c 100644 --- a/src/chatManager.hpp +++ b/src/chatManager.hpp @@ -5,15 +5,17 @@ #include <string> #include <vector> +class CSession; + class CChatManager { public: CChatManager(); ~CChatManager(); struct SMessage { - std::string msg; - std::string username; - std::optional<uintptr_t> sender = std::nullopt; // cant include session to use CSession* cause circular dependency - bool admin = false; + std::string msg; + std::string username; + std::optional<std::shared_ptr<CSession>> sender = std::nullopt; + bool admin = false; }; void newMessage(const SMessage &msg); std::string fmtBroadcastMessage(const SMessage &msg); |
