From 9d1452447481d45344a1e33446ad9a418e9ea64f Mon Sep 17 00:00:00 2001 From: littleblack111 Date: Wed, 11 Jun 2025 19:55:25 +0800 Subject: internal: fully discard the use of uintptr_t for identification use --- src/sessionManager.cpp | 5 ----- 1 file changed, 5 deletions(-) (limited to 'src/sessionManager.cpp') diff --git a/src/sessionManager.cpp b/src/sessionManager.cpp index aae56f1..de55480 100644 --- a/src/sessionManager.cpp +++ b/src/sessionManager.cpp @@ -91,11 +91,6 @@ CSession *CSessionManager::getByIp(const std::string &ip) const { return it != m_vSessions.end() ? it->second.get() : nullptr; } -CSession *CSessionManager::getByPtr(const uintptr_t &p) const { - auto it = std::ranges::find_if(m_vSessions, [&p](const auto &s) { return (uintptr_t)s.second.get() == p; }); - return it != m_vSessions.end() ? it->second.get() : nullptr; -} - std::vector> CSessionManager::getSessions() const { return m_vSessions | std::views::transform([](const auto &s) { return s.second; }) | std::ranges::to(); } -- cgit v1.2.3