fixed extra copy

This commit is contained in:
Arkoniak
2025-07-31 21:29:20 +03:00
parent f824ae9334
commit 1e0037a873
2 changed files with 2 additions and 2 deletions

View File

@ -35,7 +35,7 @@ class Config {
void setupConfig(Json::Value &dst, const std::string &config_file, int depth); void setupConfig(Json::Value &dst, const std::string &config_file, int depth);
void resolveConfigIncludes(Json::Value &config, int depth); void resolveConfigIncludes(Json::Value &config, int depth);
void mergeConfig(Json::Value &a_config_, Json::Value &b_config_); void mergeConfig(Json::Value &a_config_, Json::Value &b_config_);
std::optional<std::string> findIncludePath(const std::string name); static std::optional<std::string> findIncludePath(const std::string &name);
std::string config_file_; std::string config_file_;

View File

@ -89,7 +89,7 @@ void Config::setupConfig(Json::Value &dst, const std::string &config_file, int d
mergeConfig(dst, tmp_config); mergeConfig(dst, tmp_config);
} }
std::optional<std::string> Config::findIncludePath(const std::string name) { std::optional<std::string> Config::findIncludePath(const std::string &name) {
auto match1 = tryExpandPath(name, ""); auto match1 = tryExpandPath(name, "");
if (!match1.empty()) { if (!match1.empty()) {
return match1.front(); return match1.front();