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

clear FunctionManager in OpenFile

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