Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
a-zakir committed Oct 31, 2024
1 parent 0f4c4ed commit b00bb91
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,16 @@ namespace Antares
FileTreeStudyLoader::FileTreeStudyLoader(std::filesystem::path study_path):
study_path_{std::move(study_path)}
{
study_path_c_str_ = study_path_.string().c_str();
}

std::unique_ptr<Antares::Data::Study> FileTreeStudyLoader::load() const
{
using namespace std::literals::string_literals;
Antares::Solver::Application application;
constexpr unsigned int argc = 3;
auto study_path_c_str = study_path_.string().c_str();
std::array<const char*, argc> argv{"", study_path_c_str, "--parallel"};

std::array<const char*, argc> argv{"", study_path_c_str_, "--parallel"};
application.prepare(argc, argv.data());

return application.acquireStudy();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,5 +59,6 @@ class FileTreeStudyLoader: public IStudyLoader

private:
std::filesystem::path study_path_;
const char* study_path_c_str_ = nullptr;
};
} // namespace Antares

0 comments on commit b00bb91

Please sign in to comment.