Skip to content
Snippets Groups Projects
Commit 5004c226 authored by Christophe Geuzaine's avatar Christophe Geuzaine
Browse files

clear FunctionManager in OpenFile

parent 05a23951
Branches
Tags
No related merge requests found
...@@ -27,6 +27,7 @@ ...@@ -27,6 +27,7 @@
#if defined(HAVE_PARSER) #if defined(HAVE_PARSER)
#include "Parser.h" #include "Parser.h"
#include "FunctionManager.h"
#endif #endif
#if defined(HAVE_MESH) #if defined(HAVE_MESH)
...@@ -679,6 +680,7 @@ void OpenProject(const std::string &fileName, bool setWindowTitle) ...@@ -679,6 +680,7 @@ void OpenProject(const std::string &fileName, bool setWindowTitle)
std::map<std::string, std::string> cls(Msg::GetCommandLineStrings()); std::map<std::string, std::string> cls(Msg::GetCommandLineStrings());
for(std::map<std::string, std::string>::iterator it = cls.begin(); it != cls.end(); it++) for(std::map<std::string, std::string>::iterator it = cls.begin(); it != cls.end(); it++)
gmsh_yystringsymbols[it->first] = it->second; gmsh_yystringsymbols[it->first] = it->second;
FunctionManager::Instance()->clear();
#endif #endif
// temporary hack until we fill the current GModel on the fly during parsing // temporary hack until we fill the current GModel on the fly during parsing
......
...@@ -45,6 +45,11 @@ FunctionManager *FunctionManager::Instance() ...@@ -45,6 +45,11 @@ FunctionManager *FunctionManager::Instance()
return instance; return instance;
} }
void FunctionManager::clear()
{
functions->m.clear();
}
int FunctionManager::enterFunction(const std::string &name, gmshFILE * f, int FunctionManager::enterFunction(const std::string &name, gmshFILE * f,
std::string &filename, int &lno) const std::string &filename, int &lno) const
{ {
......
...@@ -27,6 +27,7 @@ class FunctionManager ...@@ -27,6 +27,7 @@ class FunctionManager
int enterFunction(const std::string &name, gmshFILE *f, int enterFunction(const std::string &name, gmshFILE *f,
std::string &filename, int &lineno) const; std::string &filename, int &lineno) const;
int leaveFunction(gmshFILE *f, std::string &filename, int &lineno); int leaveFunction(gmshFILE *f, std::string &filename, int &lineno);
void clear();
}; };
#endif #endif
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment