mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-04-27 11:17:49 +02:00
use unique_ptr for requested destination
This commit is contained in:
parent
408a67f34f
commit
7945126e86
2 changed files with 16 additions and 28 deletions
6
NetDb.h
6
NetDb.h
|
@ -104,8 +104,8 @@ namespace data
|
|||
void ManageLeaseSets ();
|
||||
void ManageRequests ();
|
||||
|
||||
RequestedDestination * CreateRequestedDestination (const IdentHash& dest, bool isExploratory = false);
|
||||
void DeleteRequestedDestination (RequestedDestination * dest);
|
||||
std::unique_ptr<RequestedDestination>& CreateRequestedDestination (const IdentHash& dest, bool isExploratory = false);
|
||||
void DeleteRequestedDestination (IdentHash ident);
|
||||
|
||||
template<typename Filter>
|
||||
std::shared_ptr<const RouterInfo> GetRandomRouter (Filter filter) const;
|
||||
|
@ -118,7 +118,7 @@ namespace data
|
|||
mutable std::mutex m_FloodfillsMutex;
|
||||
std::list<std::shared_ptr<RouterInfo> > m_Floodfills;
|
||||
std::mutex m_RequestedDestinationsMutex;
|
||||
std::map<IdentHash, RequestedDestination *> m_RequestedDestinations;
|
||||
std::map<IdentHash, std::unique_ptr<RequestedDestination> > m_RequestedDestinations;
|
||||
|
||||
bool m_IsRunning;
|
||||
std::thread * m_Thread;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue