From 8d405b265285c368df2e9cf1c14acee7532e0ee7 Mon Sep 17 00:00:00 2001 From: nancy.liao <huihui.liao@greentest.com.cn> Date: ćšć, 29 5æ 2025 18:14:38 +0800 Subject: [PATCH] Merge branch 'develop' of http://139.9.88.116:3000/r/module/open-license-manager into develop --- src/library/locate/EnvironmentVarLocation.cpp | 33 ++++++++++++++------------------- 1 files changed, 14 insertions(+), 19 deletions(-) diff --git a/src/library/locate/EnvironmentVarLocation.cpp b/src/library/locate/EnvironmentVarLocation.cpp index a904b9a..e029483 100644 --- a/src/library/locate/EnvironmentVarLocation.cpp +++ b/src/library/locate/EnvironmentVarLocation.cpp @@ -5,36 +5,31 @@ * Author: Gabriele Contini */ -#include <build_properties.h> +#include <licensecc_properties.h> -#include "../base/FileUtils.hpp" -#include "../base/StringUtils.h" +#include "../base/string_utils.h" #include "EnvironmentVarLocation.hpp" +#include "../base/file_utils.hpp" namespace license { namespace locate { using namespace std; -EnvironmentVarLocation::EnvironmentVarLocation() : - LocatorStrategy("EnvironmentVarLocation") { -} +EnvironmentVarLocation::EnvironmentVarLocation() : LocatorStrategy("EnvironmentVarLocation") {} -EnvironmentVarLocation::~EnvironmentVarLocation() { -} +EnvironmentVarLocation::~EnvironmentVarLocation() {} -const vector<string> EnvironmentVarLocation::license_locations( - EventRegistry &eventRegistry) { +const vector<string> EnvironmentVarLocation::license_locations(EventRegistry &eventRegistry) { vector<string> licenseFileFoundWithEnvVariable; - const string varName(LICENSE_LOCATION_ENV_VAR); + const string varName(LCC_LICENSE_LOCATION_ENV_VAR); if (varName.length() > 0) { - //var name is defined in header files. - char *env_var_value = getenv(LICENSE_LOCATION_ENV_VAR); + // var name is defined in header files. + char *env_var_value = getenv(LCC_LICENSE_LOCATION_ENV_VAR); if (env_var_value != nullptr && env_var_value[0] != '\0') { - const vector<string> declared_positions = license::split_string( - string(env_var_value), ';'); - licenseFileFoundWithEnvVariable = license::filter_existing_files( - declared_positions, eventRegistry, LICENSE_LOCATION_ENV_VAR); + const vector<string> declared_positions = license::split_string(string(env_var_value), ';'); + licenseFileFoundWithEnvVariable = + license::filter_existing_files(declared_positions, eventRegistry, LCC_LICENSE_LOCATION_ENV_VAR); } else { eventRegistry.addEvent(ENVIRONMENT_VARIABLE_NOT_DEFINED); } @@ -42,5 +37,5 @@ return licenseFileFoundWithEnvVariable; } -} -} +} // namespace locate +} // namespace license -- Gitblit v1.9.1