Commit 31f5cdeb authored by bdvd's avatar bdvd Committed by Brad King
Browse files

RegularExpression: Initialize private members on construction

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