diff options
| author | littleblack111 <littleblack11111@gmail.com> | 2025-06-13 20:19:22 +0800 |
|---|---|---|
| committer | littleblack111 <littleblack11111@gmail.com> | 2025-06-13 20:23:03 +0800 |
| commit | 8ee8e55ff2b085762dad5ab41269448e7a91757f (patch) | |
| tree | ec1ed6b4944ca1fc4f1adbf67a255912e23a516c /src/core/chatManager.hpp | |
| parent | 23492ea6f58762914a91516be6a9c180969178a2 (diff) | |
internal: shortened smart pointer types
Diffstat (limited to 'src/core/chatManager.hpp')
| -rw-r--r-- | src/core/chatManager.hpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/core/chatManager.hpp b/src/core/chatManager.hpp index bd305de..d109424 100644 --- a/src/core/chatManager.hpp +++ b/src/core/chatManager.hpp @@ -1,6 +1,6 @@ #pragma once -#include <memory> +#include "../misc/memory.hpp" #include <optional> #include <string> #include <vector> @@ -14,7 +14,7 @@ class CChatManager { struct SMessage { std::string msg; std::string username; - std::optional<std::weak_ptr<CSession>> sender = std::nullopt; + std::optional<WP<CSession>> sender = std::nullopt; bool admin = false; }; void newMessage(const SMessage &msg); @@ -22,4 +22,4 @@ class CChatManager { std::vector<SMessage> getChat() const; }; -inline std::unique_ptr<CChatManager> g_pChatManager; +inline UP<CChatManager> g_pChatManager; |
