supply a default constructor
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -207,9 +207,10 @@ class Regex {
|
||||
void Compile();
|
||||
void Release();
|
||||
public:
|
||||
Regex(const CString &pat);
|
||||
Regex(const CString &pat = "");
|
||||
Regex(const Regex &rhs);
|
||||
~Regex();
|
||||
void Set(const CString &str);
|
||||
bool Compare(const CString &str);
|
||||
bool Compare(const CString &str, vector<CString> &matches);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user