From d0b85cf10415a378c11d385066bb27116f2c2df1 Mon Sep 17 00:00:00 2001 From: Shahar Hadas <shaharhd@gmail.com> Date: 周日, 10 5月 2020 19:18:01 +0800 Subject: [PATCH] Fix network detection for Windows OS (#94) --- src/library/hw_identifier/ethernet.cpp | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/library/hw_identifier/ethernet.cpp b/src/library/hw_identifier/ethernet.cpp index ce1d6de..55b5197 100644 --- a/src/library/hw_identifier/ethernet.cpp +++ b/src/library/hw_identifier/ethernet.cpp @@ -54,7 +54,7 @@ Ethernet::~Ethernet() {} -LCC_API_IDENTIFICATION_STRATEGY Ethernet::identification_strategy() const { +LCC_API_HW_IDENTIFICATION_STRATEGY Ethernet::identification_strategy() const { return use_ip ? STRATEGY_IP_ADDRESS : STRATEGY_ETHERNET; } @@ -63,7 +63,7 @@ FUNCTION_RETURN result = generate_ethernet_pc_id(data, use_ip); vector<HwIdentifier> identifiers; if (result == FUNC_RET_OK) { - identifiers.resize(data.size()); + identifiers.reserve(data.size()); for (auto &it : data) { HwIdentifier pc_id; pc_id.set_identification_strategy(identification_strategy()); -- Gitblit v1.9.1