From 8ee8e55ff2b085762dad5ab41269448e7a91757f Mon Sep 17 00:00:00 2001 From: littleblack111 Date: Fri, 13 Jun 2025 20:19:22 +0800 Subject: internal: shortened smart pointer types --- src/core/session.hpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/core/session.hpp') diff --git a/src/core/session.hpp b/src/core/session.hpp index ca951d1..9a953fc 100644 --- a/src/core/session.hpp +++ b/src/core/session.hpp @@ -4,7 +4,7 @@ #include "chatManager.hpp" #include "../debug/format.hpp" #include -#include +#include "../misc/memory.hpp" #include #include #include @@ -31,8 +31,8 @@ class CSession { const std::string &getIp() const; bool isAdmin() const; - std::unique_ptr read(); - std::unique_ptr read(const std::string &msg, bool bypassDeaf = false); + UP read(); + UP read(const std::string &msg, bool bypassDeaf = false); bool write(const std::string &msg); template bool write(std::format_string fmt, Args &&...args); @@ -57,8 +57,8 @@ class CSession { WRITE }; - std::weak_ptr self; - std::shared_ptr m_sockfd; + WP self; + SP m_sockfd; sockaddr_in m_addr; socklen_t m_addrLen = sizeof(m_addr); std::string m_name; -- cgit v1.2.3