Skip to content

Commit

Permalink
Merge pull request #324 from Nelson-numerical-software/feat-#322-gcc-4.8
Browse files Browse the repository at this point in the history
fix #322 build with gcc 4.8
  • Loading branch information
Nelson-numerical-software committed Aug 27, 2020
2 parents 294a76b + ffb6fbe commit f96860e
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 15 deletions.
8 changes: 7 additions & 1 deletion CHANGELOG.md
@@ -1,7 +1,13 @@
# 0.4.9 (2020-09-XX)
# 0.4.9 (2020-XX-XX)

* rework timeout thread.

Compilation:
------------

* [#322](http://github.com/Nelson-numerical-software/nelson/issues/322): fix build with gcc 4.8 (ubuntu 14.04).

Nelson 0.4.9 will be last to support gcc 4.8


# 0.4.8 (2020-08-26)
Expand Down
20 changes: 6 additions & 14 deletions modules/modules_manager/src/cpp/ModulesManager.cpp
Expand Up @@ -222,32 +222,24 @@ ModulesManager::deleteAllModules()
bool
ModulesManager::deleteModule(const std::wstring& modulename)
{
std::vector<mapElement>::const_iterator it;
for (it = modulesMap.begin(); it != modulesMap.end(); ++it) {
for (auto it = modulesMap.begin(); it != modulesMap.end(); ++it) {
if (std::get<0>(*it) == modulename) {
break;
modulesMap.erase(it);
return true;
}
}
if (it != modulesMap.end()) {
modulesMap.erase(it);
return true;
}
return false;
}
//=============================================================================
bool
ModulesManager::findModule(const std::wstring& modulename, std::wstring& path)
{
std::vector<mapElement>::const_iterator it;
for (it = modulesMap.begin(); it != modulesMap.end(); ++it) {
for (auto it = modulesMap.begin(); it != modulesMap.end(); ++it) {
if (std::get<0>(*it) == modulename) {
break;
path = std::get<1>(*it);
return true;
}
}
if (it != modulesMap.end()) {
path = std::get<1>(*it);
return true;
}
return false;
}
//=============================================================================
Expand Down

0 comments on commit f96860e

Please sign in to comment.