refactor: use small maps but with `std::vector` as base

This commit is contained in:
Yat Ho 2024-03-05 09:49:21 +08:00
parent c91613a49f
commit 67bff3a398
1 changed files with 4 additions and 2 deletions

View File

@ -20,6 +20,7 @@
#include <utility>
#include <vector>
#include <small/map.hpp>
#include <small/vector.hpp>
#include <fmt/core.h>
@ -283,8 +284,9 @@ class tr_swarm
{
public:
using Peers = std::vector<tr_peerMsgs*>;
// FIXME(tearfur) replace std::unordered_map with small::map after their bugs are fixed
using Pool = std::unordered_map<tr_socket_address, std::shared_ptr<tr_peer_info>>;
// FIXME(tearfur) replace std::vector with small::vector after their bugs are fixed
using Pool = small::detail::
associative_vector<true, false, true, std::vector<std::pair<tr_socket_address, std::shared_ptr<tr_peer_info>>>>;
class WishlistMediator final : public Wishlist::Mediator
{