From 37acd98bdd181f3374d30bf01df24354495456c1 Mon Sep 17 00:00:00 2001 From: PobreGato <315121269+pobregat0@users.noreply.github.com> Date: Mon, 17 Aug 2026 03:35:32 +0300 Subject: [PATCH] move GetStreamsList body to Streaming.cpp --- libi2pd/Streaming.cpp | 9 +++++++++ libi2pd/Streaming.h | 10 +--------- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/libi2pd/Streaming.cpp b/libi2pd/Streaming.cpp index 497f4848..954eef36 100644 --- a/libi2pd/Streaming.cpp +++ b/libi2pd/Streaming.cpp @@ -2375,6 +2375,15 @@ namespace stream } } + std::vector > StreamingDestination::GetStreamsList () + { + std::vector > streams; + std::lock_guard l(m_StreamsMutex); + for (const auto& it: m_Streams) + streams.push_back (it.second); + return streams; + } + bool StreamingDestination::DeleteStream (uint32_t recvStreamID) { auto it = m_Streams.find (recvStreamID); diff --git a/libi2pd/Streaming.h b/libi2pd/Streaming.h index ccb683b2..8ba64004 100644 --- a/libi2pd/Streaming.h +++ b/libi2pd/Streaming.h @@ -394,15 +394,7 @@ namespace stream const decltype(m_Streams)& GetStreams () const { return m_Streams; }; // copy for other threads, unlike GetStreams which hands out the map itself - std::vector > GetStreamsList () - { - std::unique_lock l(m_StreamsMutex); - std::vector > streams; - streams.reserve (m_Streams.size ()); - for (const auto& it: m_Streams) - streams.push_back (it.second); - return streams; - } + std::vector > GetStreamsList (); }; //-------------------------------------------------