Skip to content
Snippets Groups Projects
Commit 31f5cdeb authored by bdvd's avatar bdvd Committed by Brad King
Browse files

RegularExpression: Initialize private members on construction

parent 116a4919
No related branches found
No related tags found
No related merge requests found
......@@ -407,8 +407,12 @@ private:
* Create an empty regular expression.
*/
inline RegularExpression::RegularExpression()
: regstart{}
, reganch{}
, regmust{}
, program{ 0 }
, progsize{}
{
this->program = 0;
}
/**
......@@ -416,8 +420,12 @@ inline RegularExpression::RegularExpression()
* compiles s.
*/
inline RegularExpression::RegularExpression(const char* s)
: regstart{}
, reganch{}
, regmust{}
, program{ 0 }
, progsize{}
{
this->program = 0;
if (s) {
this->compile(s);
}
......@@ -428,8 +436,12 @@ inline RegularExpression::RegularExpression(const char* s)
* compiles s.
*/
inline RegularExpression::RegularExpression(const std::string& s)
: regstart{}
, reganch{}
, regmust{}
, program{ 0 }
, progsize{}
{
this->program = 0;
this->compile(s);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment