supply a default constructor

This commit is contained in:
Glenn Maynard
2003-03-27 20:16:17 +00:00
parent 4c599babac
commit 2303e8cd3e
2 changed files with 11 additions and 4 deletions
+9 -3
View File
@@ -667,17 +667,23 @@ void Regex::Compile()
ASSERT(backrefs+1 < 128);
}
void Regex::Set(const CString &str)
{
Release();
pattern=str;
Compile();
}
void Regex::Release()
{
delete (regex_t *)reg;
reg = NULL;
}
Regex::Regex(const CString &pattern_)
Regex::Regex(const CString &str)
{
reg = NULL;
pattern=pattern_;
Compile();
Set(str);
}
Regex::Regex(const Regex &rhs)