From ecd2f38f3d9c8b28aaa4c47bc09789f11dcaa7f7 Mon Sep 17 00:00:00 2001 From: gcontini <1121667+gcontini@users.noreply.github.com> Date: 周日, 29 11月 2020 11:19:33 +0800 Subject: [PATCH] fix documentation warnings and broken links --- src/library/hw_identifier/hw_identifier_facade.cpp | 17 ++--------------- 1 files changed, 2 insertions(+), 15 deletions(-) diff --git a/src/library/hw_identifier/hw_identifier_facade.cpp b/src/library/hw_identifier/hw_identifier_facade.cpp index 0b834db..193dfab 100644 --- a/src/library/hw_identifier/hw_identifier_facade.cpp +++ b/src/library/hw_identifier/hw_identifier_facade.cpp @@ -12,8 +12,6 @@ #include "../base/base.h" #include "../base/logger.h" -#include "../os/cpu_info.hpp" -#include "../os/execution_environment.hpp" #include "identification_strategy.hpp" #include "hw_identifier.hpp" @@ -31,6 +29,7 @@ result = strategy->validate_identifier(pc_id); } catch (logic_error& e) { LOG_ERROR("Error validating identifier %s: %s", str_code.c_str(), e.what()); + ((void)(e)); } return result; } @@ -54,21 +53,9 @@ unique_ptr<IdentificationStrategy> strategy_ptr = IdentificationStrategy::get_strategy(strategy); HwIdentifier pc_id; FUNCTION_RETURN result = strategy_ptr->generate_pc_id(pc_id); + pc_id.set_use_environment_var(use_env_var); if (result != FUNC_RET_OK) { throw logic_error("strategy " + to_string(strategy_ptr->identification_strategy()) + " failed"); - } - os::ExecutionEnvironment exec; - os::VIRTUALIZATION virtualization = exec.getVirtualization(); - pc_id.set_virtual_environment(virtualization); - pc_id.set_use_environment_var(use_env_var); - if (virtualization != os::NONE) { - bool isCloud = exec.is_cloud(); - if (isCloud) { - pc_id.set_cloud_provider(exec.getCloudProvider()); - } else { - os::CpuInfo cpu; - pc_id.set_virtualization(cpu.virtualization_details()); - } } return pc_id.print(); } -- Gitblit v1.9.1