diff --git a/libservice/headers/service/Aggregator.h b/libservice/headers/service/Aggregator.h index 85095241..a2a747cc 100644 --- a/libservice/headers/service/Aggregator.h +++ b/libservice/headers/service/Aggregator.h @@ -47,13 +47,14 @@ class Aggregator { private: using ServiceKey = std::pair; using ServiceStorage = std::unordered_map; + using ServicesList = std::vector>; public: Aggregator(const service::IpAddressChecker& ipChecker); void clear(); void newRequest(const httpparser::HttpRequest& request, const DiscoverySessionMeta& meta); - std::vector> collectServices(); + ServicesList collectServices(); private: const IpAddressChecker& ipChecker; diff --git a/libservice/src/Aggregator.cpp b/libservice/src/Aggregator.cpp index 1052b28f..e565a571 100644 --- a/libservice/src/Aggregator.cpp +++ b/libservice/src/Aggregator.cpp @@ -122,8 +122,8 @@ void Aggregator::newRequest(const httpparser::HttpRequest& request, const Discov services[key] = std::move(newService); } -std::vector> Aggregator::collectServices() { - std::vector> servicesVec; +ServicesList Aggregator::collectServices() { + ServicesList servicesVec; servicesVec.reserve(services.size()); for (auto& pair : services) {