Skip to content
Snippets Groups Projects
Commit cdd52ce1 authored by Brad King's avatar Brad King
Browse files

RegularExpression: Initialize RegularExpressionMatch arrays fully

The `RegularExpressionMatch` class added by commit cff58f07
(RegularExpression: New RegularExpressionMatch class, 2017-12-04) has
members with array-of-pointer types.  Use uniform initialization
syntax to initialize all array elements on construction.

This fixes a Clang scan-build 7 warning:

```
RegularExpression.hxx:138:23: warning: The left operand of '==' is a garbage value
  if (this->startp[n] == nullptr) {
      ~~~~~~~~~~~~~~~ ^
```
parent 65366723
No related branches found
No related tags found
No related merge requests found
......@@ -70,10 +70,10 @@ private:
* \brief Creates an invalid match object
*/
inline RegularExpressionMatch::RegularExpressionMatch()
: startp{}
, endp{}
, searchstring{}
{
startp[0] = nullptr;
endp[0] = nullptr;
searchstring = nullptr;
}
/**
......
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