diff --git a/src/ConfigFile.cc b/src/ConfigFile.cc index b9fc93a47632726226892ab4c1cf43d906d6742d..d1b2d314b0d74cf84fd1185968461a7a946438dd 100644 --- a/src/ConfigFile.cc +++ b/src/ConfigFile.cc @@ -21,6 +21,7 @@ #include <fstream> #include <utility> #include <vector> +#include <filesystem> #include "ConfigFile.hh" @@ -679,10 +680,10 @@ ConfigFile::transformPass() member_node.second /= weight_denominator; } -vector<string> +vector<filesystem::path> ConfigFile::getIncludePaths() const { - vector<string> include_paths; + vector<filesystem::path> include_paths; for (auto path : paths) for (const auto & mapit : path.get_paths()) for (const auto & vecit : mapit.second) diff --git a/src/ConfigFile.hh b/src/ConfigFile.hh index 5e5dbada6e0853e58707f184580320e03e81b160..ad1c9b5c519348e24857ecde991a44c4d26f3b54 100644 --- a/src/ConfigFile.hh +++ b/src/ConfigFile.hh @@ -130,7 +130,7 @@ public: //! Check Pass void transformPass(); //! Get Path Info - vector<string> getIncludePaths() const; + vector<filesystem::path> getIncludePaths() const; //! Write any hooks void writeHooks(ostream &output) const; //! Create options_.parallel structure, write options diff --git a/src/DynareMain.cc b/src/DynareMain.cc index 06a1e547ded9cd767f4e1524d4b167169261408a..bd21ebe3dd9b712aad264c1756490eca5fd97d33 100644 --- a/src/DynareMain.cc +++ b/src/DynareMain.cc @@ -408,8 +408,7 @@ main(int argc, char **argv) // If Include option was passed to the [paths] block of the config file, add // it to paths before macroprocessing - vector<string> config_include_paths = config_file.getIncludePaths(); - for (const auto &it : config_include_paths) + for (const auto &it : config_file.getIncludePaths()) paths.emplace_back(it); // Do macro processing