diff --git a/Applications/ApplicationsLib/ProjectData.h b/Applications/ApplicationsLib/ProjectData.h index c8e98f78e26f1899e4f2965edde58fbbbb6a4b5b..8bed77758b1ca4db94bf8ad10213917e3193bb5d 100644 --- a/Applications/ApplicationsLib/ProjectData.h +++ b/Applications/ApplicationsLib/ProjectData.h @@ -102,27 +102,11 @@ public: // Process interface // - /// Iterator access for processes. /// Provides read access to the process container. - std::map<std::string, std::unique_ptr<ProcessLib::Process>>::const_iterator - processesBegin() const + std::map<std::string, std::unique_ptr<ProcessLib::Process>> const& + getProcesses() const { - return _processes.begin(); - } - std::map<std::string, std::unique_ptr<ProcessLib::Process>>::iterator processesBegin() - { - return _processes.begin(); - } - - /// Iterator access for processes as in processesBegin(). - std::map<std::string, std::unique_ptr<ProcessLib::Process>>::const_iterator - processesEnd() const - { - return _processes.end(); - } - std::map<std::string, std::unique_ptr<ProcessLib::Process>>::iterator processesEnd() - { - return _processes.end(); + return _processes; } TimeLoop& getTimeLoop() { return *_time_loop; } diff --git a/Applications/CLI/ogs.cpp b/Applications/CLI/ogs.cpp index 1c51f7dd876ecdaf02f7ab7094b1f35965fbc49d..e6a9087ba2c892e894515bfe90e159d193fc25c7 100644 --- a/Applications/CLI/ogs.cpp +++ b/Applications/CLI/ogs.cpp @@ -111,10 +111,9 @@ int main(int argc, char *argv[]) BaseLib::ConfigTree::assertNoSwallowedErrors(); INFO("Initialize processes."); - for (auto p_it = project.processesBegin(); - p_it != project.processesEnd(); ++p_it) + for (auto& p : project.getProcesses()) { - p_it->second->initialize(); + p.second->initialize(); } BaseLib::ConfigTree::assertNoSwallowedErrors();