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/sessionManager.cpp | |
| parent | e30f6eb6872d57f7da764690589c2f0c9ffdb53b (diff) | |
internal: fully discard the use of uintptr_t for identification use
Diffstat (limited to 'src/sessionManager.cpp')
| -rw-r--r-- | src/sessionManager.cpp | 5 |
1 files changed, 0 insertions, 5 deletions
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<std::shared_ptr<CSession>> CSessionManager::getSessions() const { return m_vSessions | std::views::transform([](const auto &s) { return s.second; }) | std::ranges::to<std::vector>(); } |
