mirror of
https://github.com/xiaozhou233/JuiceAgent.git
synced 2026-12-05 21:15:56 +08:00
Refactor: remove unused loader config helpers
- config: drop get_loader_config / print_loader_config and the LoaderConfig struct, which were unused and still referenced the v1 key JuiceAgent.Loader.JuiceAgentNativeLibraryPath - config: drop the now-unneeded ConfigStruct.hpp and Utils.hpp includes (consumers include Utils.hpp directly)
This commit is contained in:
1 parent
5170d50517
commit
fd6fe0abdb
3 files changed
-32
No files matched your search
@@ -8,8 +8,6 @@
|
||||
#include <vector>
|
||||
#include <cstddef>
|
||||
#include <JuiceAgent/Logger.hpp>
|
||||
#include <JuiceAgent/Utils.hpp>
|
||||
#include <JuiceAgent/ConfigStruct.hpp>
|
||||
|
||||
namespace JuiceAgent::Config {
|
||||
|
||||
@@ -233,24 +231,4 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
namespace Utils {
|
||||
inline LoaderConfig get_loader_config(const Config& config)
|
||||
{
|
||||
LoaderConfig loader_config;
|
||||
loader_config.JuiceAgentNativeLibraryPath = config.getPath(
|
||||
"JuiceAgent.Loader.JuiceAgentNativeLibraryPath",
|
||||
(config.getRuntimeDir() / "libagent.dll").string()
|
||||
);
|
||||
loader_config.RuntimeDir = config.getRuntimeDir().string();
|
||||
|
||||
return loader_config;
|
||||
}
|
||||
|
||||
inline void print_loader_config(const LoaderConfig& config)
|
||||
{
|
||||
spdlog::info("JuiceAgentNativeLibraryPath: {}", config.JuiceAgentNativeLibraryPath);
|
||||
spdlog::info("RuntimeDir: {}", config.RuntimeDir);
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace JuiceAgent::Config
|
||||
@@ -1,9 +0,0 @@
|
||||
#pragma once
|
||||
|
||||
#include <string>
|
||||
|
||||
struct LoaderConfig {
|
||||
std::string JuiceAgentNativeLibraryPath;
|
||||
|
||||
std::string RuntimeDir;
|
||||
};
|
||||
Reference in new issue
Block a user