fixed extra copy
This commit is contained in:
@ -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_;
|
||||||
|
|
||||||
|
@ -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();
|
||||||
|
Reference in New Issue
Block a user