diff --git a/modules/gmt/modgmt_strcomp.h b/modules/gmt/modgmt_strcomp.h index 143822c..37eb36a 100644 --- a/modules/gmt/modgmt_strcomp.h +++ b/modules/gmt/modgmt_strcomp.h @@ -1,9 +1,10 @@ -#include +#ifndef MODGMT_STRCOMP_H +#define MODGMT_STRCOMP_H #include #include #include -#include +// Compare string with template class TemplateComparator { TemplateComparator() = delete; @@ -47,6 +48,12 @@ class TemplateComparator Cursors cursors; const std::string s; + void Reset() + { + cursors.clear(); + InitCursors(root.get()); + } + public: TemplateComparator(const char* str):s(str) {root=Parse();} TemplateComparator(const std::string& str):s(str) {root=Parse();} @@ -58,10 +65,6 @@ class TemplateComparator for(size_t pos=0; pos